-
-
Save Vanethos/d331a7c3856bcc3f40fa0254a88dfa46 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 { | |
//... | |
HomeBloc getHomeBloc({bool forceCreate = false}) { | |
if (_homeBloc == null || forceCreate) { | |
_homeBloc = HomeBloc(endpointA, endpointB) | |
} | |
return _homeBloc; | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment