Last active
April 12, 2019 07:33
-
-
Save Vanethos/fee1ad1ce24e3304728a44244c6cc2fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InjectorWidget extends InheritedWidget { | |
//... | |
void init() async { | |
// this can be an access to the SharedPreferences, for example | |
var token = await getToken(); | |
var httpClient = HttpClient(token); | |
_endpointA = EndpointsA(httpClient); | |
_endpointB = EndpointsB(httpClient); | |
_homeBloc = HomeBloc(endpointA, endpointB); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment