1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
import 'package:flutter/material.dart';
class AppTheme {
static ThemeData lightTheme = ThemeData(
brightness: Brightness.light,
primaryColor: Colors.blue,
hintColor: Colors.blueAccent,
scaffoldBackgroundColor: Colors.white,
cardColor: Colors.white,
dividerColor: Colors.grey,
textTheme: const TextTheme(
displayMedium: TextStyle(fontSize: 42, color: Colors.blueGrey),
titleMedium: TextStyle(fontSize: 24, color: Colors.blue),
bodyMedium: TextStyle(fontSize: 14, color: Colors.black),
),
buttonTheme: ButtonThemeData(
buttonColor: Colors.blue,
disabledColor: Colors.blue[300],
textTheme: ButtonTextTheme.primary,
),
// 其他主题配置...
);
static ThemeData darkTheme = ThemeData(
brightness: Brightness.dark,
primaryColor: Colors.blueGrey[900],
hintColor: Colors.blueGrey[700],
scaffoldBackgroundColor: Colors.grey[850],
cardColor: Colors.grey[800],
dividerColor: Colors.white,
textTheme: TextTheme(
displayMedium: TextStyle(fontSize: 42, color: Colors.blueGrey[200]),
titleMedium: TextStyle(fontSize: 24, color: Colors.blueGrey[100]),
bodyMedium: const TextStyle(fontSize: 14, color: Colors.white),
),
buttonTheme: ButtonThemeData(
buttonColor: Colors.blueGrey[700],
disabledColor: Colors.blueGrey[400],
textTheme: ButtonTextTheme.primary,
),
);
}
|