So, I'm trying to adapt the login page from the flutter example "Shrine", however, when using the Login page as is, I get a weird null value error.
I have not the slightest hint what I'm doing wrong here, and what I should change. Yes, I tried poking into it with the debugger, but I still have no clue.
The exact place the error seems to occur (I think) is here:
static GalleryOptions of(BuildContext context) {
final scope =
context.dependOnInheritedWidgetOfExactType<_ModelBindingScope>()!;
return scope.modelBindingState.currentModel;
}
For those interested, the code is up on my GitHub: https://github.com/vguttmann/betterchips/tree/dev
So, what's going on here? How do I fix it? Why did it happen in the first place?