WallPaper_FSX_Flutter/lib/common/theme/themes.dart
fengshengxiong 73bb10f7f3 first commit
2024-05-08 16:35:29 +08:00

33 lines
1023 B
Dart

// 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,
);