bootFinished function

Future<Nylo> bootFinished(
  1. Nylo nylo,
  2. Map<Type, NyProvider> providers, {
  3. String key = "nylo",
})

Called after Nylo finishes booting.

Implementation

Future<Nylo> bootFinished(Nylo nylo, Map<Type, NyProvider> providers,
    {String key = "nylo"}) async {
  for (var provider in providers.values) {
    await provider.afterBoot(nylo);
  }
  Backpack.instance.set(key, nylo);
  try {
    Nylo.canMonitorAppUsage();
    await Nylo.appLaunched();
  } on Exception catch (_) {}

  return nylo;
}