AI-Clipboard/lib/theme/app_themes.dart
fengshengxiong 50c2738fc5 搭建框架:
1.状态管理、路由、依赖注入
2.屏幕适配
3.日志封装
2024-05-07 18:16:51 +08:00

41 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'app_colors.dart';
/// [author] fengshengxiong
/// [date] 2024/5/7
/// [description] 主题
/// 浅色主题
ThemeData lightTheme = ThemeData.light(useMaterial3: true).copyWith(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
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: Colors.deepPurple),
primaryColor: primary,
scaffoldBackgroundColor: ThemeData.light().scaffoldBackgroundColor,
appBarTheme: AppBarTheme(
elevation: 0.0,
systemOverlayStyle: SystemUiOverlayStyle.dark,
backgroundColor: ThemeData.light().scaffoldBackgroundColor,
iconTheme: const IconThemeData(color: Colors.black),
),
);