getAsync<C extends IController> static method
Implementation
static Future<C> getAsync<C extends IController>(BuildContext context) {
final completer = Completer<C>();
WidgetsBinding.instance.addPostFrameCallback((_) async {
completer.complete(LocatorProvider.of(context).get<C>());
});
return completer.future;
}