initState method

  1. @override
void initState()
override

The App State's initialization function.

Implementation

@override
void initState() {
  //
  super.initState();

  /// If not already, have the app assign the theme in the Material platform.
  final themeData = theme ?? onTheme();

  if (themeData != null) {
    v.App.themeData = themeData;
  }

  // The app may supply a theme.
  v.App.themeData ??= ThemeData.light();

  /// If not already, have the app assign the theme in the Cupertino platform.
  final iOSThemeData = iOSTheme ?? oniOSTheme();

  if (iOSThemeData != null) {
    v.App.iOSTheme = iOSThemeData;
  }

  v.App.iOSTheme ??=
      MaterialBasedCupertinoThemeData(materialTheme: v.App.themeData!);
}