lightTheme static method

ThemeData lightTheme([
  1. NZThemeConfig config = NZThemeConfig.defaultContent
])

获取浅色主题配置

config 可选的主题配置参数,若不提供则使用默认配置。

Implementation

static ThemeData lightTheme([
  NZThemeConfig config = NZThemeConfig.defaultContent,
]) {
  return ThemeData(
    useMaterial3: true,
    primaryColor: config.primaryColor,
    fontFamily: config.fontFamily,
    colorScheme: ColorScheme.fromSeed(
      seedColor: config.primaryColor,
      primary: config.primaryColor,
      secondary: config.secondaryColor,
      surface: Colors.white,
      brightness: Brightness.light,
    ),
    scaffoldBackgroundColor: config.lightScaffoldBackgroundColor,
    appBarTheme: const AppBarTheme(
      backgroundColor: Colors.white,
      elevation: 0,
      centerTitle: true,
      titleTextStyle: TextStyle(
        color: Colors.black,
        fontSize: 18,
        fontWeight: FontWeight.bold,
      ),
      iconTheme: IconThemeData(color: Colors.black),
    ),
  );
}