INNER CODE UNIT · Dart

MyApp

darkmoonight/Zest · lib/main.dart:271

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  static Future<void> updateAppState(
    BuildContext context, {
    bool? newAmoledTheme,
    bool? newMaterialColor,
    bool? newIsImage,
    String? newTimeformat,
    String? newFirstDay,
    Locale? newLocale,
    bool completeOnboarding = false,
  }) async {
    final state = context.findAncestorStateOfType<_MyAppState>()!;
    if (newAmoledTheme != null) state.changeAmoledTheme(newAmoledTheme);
    if (newMaterialColor != null) state.changeMaterialTheme(newMaterialColor);
    if (newLocale != null) state.changeLocale(newLocale);
    if (completeOnboarding) state.completeOnboarding();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…