addApp2 method

  1. @override
Future<LoggedOut> addApp2(
  1. AccessBloc accessBloc,
  2. Map<String, PagesAndDialogAccesss> accesses,
  3. List<DeterminedApp> apps,
  4. AppModel newCurrentApp,
)
override

Implementation

@override
Future<LoggedOut> addApp2(
    AccessBloc accessBloc,
    Map<String, PagesAndDialogAccesss> accesses,
    List<DeterminedApp> apps,
    AppModel newCurrentApp) async {
  var homePage = await getHomepage(newCurrentApp);
  var newAccesses = await AccessHelper.extendAccesses(
      accessBloc, null, accesses, newCurrentApp, false);
  var newApps = apps.map((v) => v).toList();
  newApps.add(DeterminedApp(newCurrentApp, homePage));
  return Future.value(LoggedOut._(newApps, newAccesses,
      playstoreApp: playstoreApp, newForceRefresh: forceRefresh));
}