Mohamed Sonata
Mohamed Sonata

Reputation: 75

Flutter Application Stop Responsing and should kill the app and run again to work after call Random Functions in App

My problem only happen while im trying to use the app and click on buttons to on screen..

The application does not stop responding when I click on a specific one, what happens and this happens randomly, I do not know why

And Also Android Studio Going in infinite for loop and keeping Print in console this message ( log : null)

Screen Shot Of what happen in android studio

https://i.sstatic.net/2VWJn.png

Upvotes: 0

Views: 284

Answers (1)

Mohamed Sonata
Mohamed Sonata

Reputation: 75

if You Using Flutter Bloc The Default parameter in BlocProvider(lazy: true); Should changing to false If there a lot of states used

Example :

 BlocProvider(
  lazy: false,// This should be false Not True
  create: (BuildContext context)=> ExampleCubitClass(),
  child: BlocConsumer<ExampleCubitClass,ExampleStatesClass>(
    listener: (context,state){},
    builder: (context,state){}

Upvotes: 0

Related Questions