init method
Future<void>
init(
[ - InitState initialState = InitState.notStarted
])
override
Implementation
@override
Future<void> init([InitState initialState = InitState.notStarted]) {
return runInAction(() {
/// The loader is being created with a Future<void> first just to set the value.
/// This happens very early in the bootstrapping process.
/// There could be plugins that can depend on the platform getting
/// ready before they do their work.
_loader.value = ObservableFuture(Future.value()).then((_) async {
final trace = await vyuh.analytics.startTrace('Platform', 'Init');
try {
await _initLoop(initialState, trace);
} catch (exception, trace) {
vyuh.analytics.reportError(exception, stackTrace: trace);
rethrow;
} finally {
await trace.stop();
}
});
return _loader.value!;
});
}