Untitled
unknown
plain_text
3 years ago
609 B
5
Indexable
/* Flutter & Dart */
import 'package:flutter/material.dart';
class CustomInitState extends StatefulWidget {
final void Function() initState;
final void Function()? dispose;
final Widget child;
CustomInitState({
required this.initState,
required this.child,
this.dispose,
});
@override
_CustomInitStateState createState() => _CustomInitStateState();
}
class _CustomInitStateState extends State<CustomInitState> {
@override
void initState() {
super.initState();
widget.initState();
}
@override
Widget build(BuildContext context) {
return widget.child;
}
}
Editor is loading...