getLoggedIn2 static method

Future<LoggedIn> getLoggedIn2(
  1. AccessBloc accessBloc,
  2. User usr,
  3. MemberModel member,
  4. AppModel app,
  5. List<String> subscribedToApps, {
  6. AppModel? playstoreApp,
})

Implementation

static Future<LoggedIn> getLoggedIn2(
  AccessBloc accessBloc,
  User usr,
  MemberModel member,
  AppModel app,
  List<String> subscribedToApps, {
  AppModel? playstoreApp,
}) async {
  var accesses =
      await AccessHelper.getAccesses2(accessBloc, member, [app], false);
  var privilegeLevel = _privilegeLevel(app.documentID, accesses);
  var appIsBlocked = _isBlocked(app.documentID, accesses);
  var homePage = await getHomepage(app, appIsBlocked, privilegeLevel);
  var apps = [DeterminedApp(app, homePage)];
  List<String> blockedMembers =
      await MaintainBlocked.getBlockedMembers(member.documentID);

  return LoggedIn._(
    usr,
    member,
    null,
    apps,
    accesses,
    subscribedToApps,
    blockedMembers,
    playstoreApp: playstoreApp,
  );
}