Where do you usually place your BlocProvider?
above the Scaffold?
I nside the body of the widget?
And why?
Where do you usually place your BlocProvider?
above the Scaffold?
I nside the body of the widget?
And why?
With BlocProvider, BlocBuilder, BlocConsumer you should place it above where it’s needed. You should avoid unnecessary rebuilds, and unnecessary tree traversal.
ok, i use it above the body just and if i have any changes in the appbar or floating action button
it will make the blocProvider above all scaffold so it will make any issues in performance or tree traversal ?
Supported by Invoice Ninja and Event Schedule
It's All Widgets! • Flutter Pro • FlutterX • Flutter Streams • Flutter Podcast
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape. Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.