initState method
Call initState for cubit and call initAfterFirstLayout
after frame completed.
Implementation
@mustCallSuper
@override
void initState() {
super.initState();
cubit.initState(context);
WidgetsBinding.instance.endOfFrame.then((_) {
if (mounted) {
cubit.initAfterFirstLayout(context);
cubit.initArgument<T>(context, widget);
}
});
}