startApp function
Implementation
void startApp({
AppAuthType appAuthType = AppAuthType.FIREBASE_AUTH,
BackendType backendType = BackendType.MOCK,
AppThemeType appThemeType = AppThemeType.OFFLINE,
AppContextType appContextType = AppContextType.PROD,
bool shouldReportDevCrashes = true,
bool allowDynamicLink = true,
}) {
WidgetsFlutterBinding.ensureInitialized();
AppContext appContext =
getAppContext(appContextType, allowDynamicLink: allowDynamicLink);
AppAuth appAuth = getAppAuth(appAuthType);
AppTheme appTheme = getAppTheme(appThemeType);
DataBackend dataBackend = getDataBackend(backendType);
runApp(
MultiProvider(
providers: [
ChangeNotifierProvider(create: (context) => appTheme),
ChangeNotifierProvider(create: (context) => appAuth),
ChangeNotifierProvider(create: (context) => dataBackend),
ChangeNotifierProvider(create: (context) => appContext),
],
child: IwfpApp(),
),
);
}