davefaliskie / travel_treasury

1ManStartup - Travel Budget Flutter App

Home Page:http://1manstartup.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For some reason even though I have the auth in the Provider widget, it still returns as null can you help me out please?

elompo23 opened this issue · comments

code:

class Provider extends InheritedWidget {
final AuthService auth;

Provider({Key key, Widget child, this.auth, }) : super(key: key, child: child);

@OverRide
bool updateShouldNotify(InheritedWidget oldWidget) {
return true;
}

static Provider of(BuildContext context) =>
(context.dependOnInheritedWidgetOfExactType());
}

change context.dependOnInheritedWidgetOfExactType() to (context.dependOnInheritedWidgetOfExactType<Provider>());