// Author: fengshengxiong // Date: 2024/5/7 // Description: 主题 import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'colors.dart'; /// 浅色主题 ThemeData lightTheme = ThemeData.light(useMaterial3: true).copyWith( colorScheme: ColorScheme.fromSeed(seedColor: primary), primaryColor: primary, scaffoldBackgroundColor: white, appBarTheme: AppBarTheme( systemOverlayStyle: SystemUiOverlayStyle.light, backgroundColor: primary, iconTheme: const IconThemeData(color: white), elevation: 0.0, centerTitle: true, titleTextStyle: TextStyle(color: white, fontSize: 25.sp, fontWeight: FontWeight.w500), ), textSelectionTheme: const TextSelectionThemeData( cursorColor: primary, selectionHandleColor: primary, ), ); /// 深色主题 ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith( colorScheme: ColorScheme.fromSeed(seedColor: primary), primaryColor: primary, );