getTheme static method

ThemeData getTheme(
  1. int index, {
  2. FlexSubThemesData? subThemesData,
  3. BuildTheme? buildDefaultTheme,
})

默认主题

Implementation

static ThemeData getTheme(int index,
    {FlexSubThemesData? subThemesData, BuildTheme? buildDefaultTheme}) {
  final defaultTheme = FlexThemeData.light();
  return buildDefaultTheme?.call(defaultTheme) ??
      FlexThemeData.light(
          scheme: CustomAppThemeData.values[index].flexScheme,
          surfaceMode: FlexSurfaceMode.highScaffoldLowSurface,
          blendLevel: 20,
          appBarOpacity: 1,
          visualDensity: FlexColorScheme.comfortablePlatformDensity,
          useMaterial3: true,
          subThemesData: subThemesData);
}