dark property
ThemeData
get
dark
暗黑主题
Implementation
static ThemeData get dark {
return ThemeData(
///主色
primaryColor: LightColors.primary,
///亮度
brightness: Brightness.dark,
///去除水波纹
splashFactory: NoSplash.splashFactory,
useMaterial3: true,
///文字主题
textTheme: TextTheme(
titleLarge: TextStyles.titleLarge,
titleMedium: TextStyles.titleMedium,
titleSmall: TextStyles.titleSmall,
bodyLarge: TextStyles.bodyLarge,
bodyMedium: TextStyles.bodyMedium,
bodySmall: TextStyles.bodySmall,
),
///appBar
appBarTheme: BaseThemeData.appBar.copyWith(
titleTextStyle: TextStyles.appBarTitle.copyWith(
color: Colors.white,
),
),
///tabBar
tabBarTheme: BaseThemeData.tabBar,
///card
cardTheme: BaseThemeData.card,
///底部导航栏
bottomNavigationBarTheme: BaseThemeData.bottomNavigationBar,
///divider
dividerTheme: BaseThemeData.divider,
///扩展属性
extensions: [
SupportColors(
error: LightColors.error.reverseBrightness,
info: LightColors.info.reverseBrightness,
warn: LightColors.warn.reverseBrightness,
sup1: LightColors.sup1.reverseBrightness,
sup2: LightColors.sup2.reverseBrightness,
sup3: LightColors.sup3.reverseBrightness,
sup4: LightColors.sup4.reverseBrightness,
title: LightColors.title.reverseColor,
body: LightColors.body.reverseColor,
darknessText: LightColors.darknessText.reverseColor,
),
]);
}