Student Reviews
( 5 Of 5 )
1 review
Video of 96- Flutter State Management - Provider - watch extension method & Provider.of(context)(Arabic) in Flutter course by Code2Start - Mohamed Fathy Taha channel, video No. 96 free certified online
Obtain a value from the nearest ancestor provider of type T, and subscribe to the provider.
Calling this method is equivalent to calling:
Provider.of(context)
This method is accessible only inside StatelessWidget.build and State.build.
If you need need to use it outside of these methods, consider using Provider.of instead, which doesn't have this restriction.
The only exception to this rule is Providers's update method.
source code
https://github.com/code2start/Flutter-State-Management/tree/lesson19-provider-lesson6