initState method

  1. @mustCallSuper
  2. @override
void initState()
override

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);
    }
  });
}