You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I don't see any issue of your implementations.
It was best to mention the error logs.
Something you have to aware of that (context.dependOnInheritedWidgetOfExactType() as LoginProvider).bloc; is deprecated since then I guess now it got removed.
I don't know if that error is valid. or you still working on the project. sorry for late answer.
Here is the Login Provider:
class LoginProvider extends InheritedWidget {
final bloc = new FormBloc();
LoginProvider({required Key key, required Widget child}) : super(key: key, child: child);
// constructor, forward to Parent InheritedWidget
u/override
bool updateShouldNotify(InheritedWidget _) {
// Todo implantation
return true;
}
static FormBloc of(BuildContext context) {
return (context.dependOnInheritedWidgetOfExactType() as LoginProvider).bloc;
}
}
And on my Login Page, I call that as:
Widget build(BuildContext context) {
final FormBloc formBloc = LoginProvider.of(context);
...
What do I do wrong? Thank you in advance.
The text was updated successfully, but these errors were encountered: