getState method
Implementation
InitializedPayState? getState(BuildContext context) {
try {
var bloc = BlocProvider.of<PayBloc>(context);
var state = bloc.state;
if (state is InitializedPayState) {
return state;
}
} catch (_) {}
return null;
}