48 lines
1.5 KiB
Dart
48 lines
1.5 KiB
Dart
// Author: fengshengxiong
|
||
// Date: 2024/5/7
|
||
// Description: 主题
|
||
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
import 'package:wallpaper/res/themes/app_colors.dart';
|
||
|
||
/// 深色主题
|
||
ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
|
||
colorScheme: ColorScheme.fromSeed(seedColor: seedColor, primary: Colors.white),
|
||
scaffoldBackgroundColor: Colors.black54,
|
||
appBarTheme: AppBarTheme(
|
||
elevation: 0.0,
|
||
centerTitle: true,
|
||
backgroundColor: Colors.black,
|
||
iconTheme: const IconThemeData(
|
||
color: Colors.white,
|
||
),
|
||
titleTextStyle: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 16.sp,
|
||
fontWeight: FontWeight.w600,
|
||
),
|
||
),
|
||
tabBarTheme: TabBarTheme(
|
||
dividerHeight: 0,
|
||
tabAlignment: TabAlignment.center,
|
||
indicatorColor: Colors.white,
|
||
labelStyle: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 15.sp,
|
||
fontWeight: FontWeight.w500,
|
||
),
|
||
unselectedLabelStyle: TextStyle(
|
||
color: const Color(0xFF757575),
|
||
fontSize: 15.sp,
|
||
),
|
||
),
|
||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||
elevation: 0.0,
|
||
backgroundColor: Colors.black,
|
||
// selectedFontSize字体默认14会让BottomNavigationBar高度增加,56->58,因此将大小改为12
|
||
selectedLabelStyle: TextStyle(fontSize: 12.sp, fontWeight: FontWeight.w500),
|
||
selectedItemColor: Colors.white,
|
||
unselectedItemColor: const Color(0xFF757575),
|
||
),
|
||
); |