1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:gpt_detector/app/theme/theme_constants.dart' ;
3
- import 'package:gpt_detector/app/theme/theme_extensions/theme_extensions.dart' ;
4
3
5
4
abstract base class BaseTheme {
6
5
Brightness get brightness;
7
- Iterable <ThemeExtension <ThemeExtensions >> get extensions;
6
+ Iterable <ThemeExtension <ThemeExtension >> get extensions;
8
7
9
8
ThemeData get theme {
10
9
return ThemeData (
11
- useMaterial3 : true ,
10
+ fontFamily : 'Poppins' ,
12
11
brightness: brightness,
13
12
extensions: extensions,
14
13
colorSchemeSeed: Colors .deepPurple,
@@ -22,51 +21,47 @@ abstract base class BaseTheme {
22
21
);
23
22
}
24
23
25
- AppBarTheme get _appBarTheme {
26
- return const AppBarTheme (
27
- centerTitle: true ,
28
- );
29
- }
30
-
31
- CardTheme get _cardTheme {
32
- return CardTheme (
33
- margin: EdgeInsets .zero,
34
- elevation: ThemeConstants .elevation,
35
- shape: RoundedRectangleBorder (
36
- borderRadius: ThemeConstants .borderRadiusCircular,
37
- ),
38
- );
39
- }
24
+ final AppBarTheme _appBarTheme = const AppBarTheme (
25
+ centerTitle: true ,
26
+ );
40
27
41
- DialogTheme get _dialogTheme {
42
- return DialogTheme (
43
- elevation: ThemeConstants .elevation,
44
- shape: RoundedRectangleBorder (
45
- borderRadius: ThemeConstants .borderRadiusCircular,
46
- ),
47
- );
48
- }
28
+ final CardTheme _cardTheme = CardTheme (
29
+ margin: EdgeInsets .zero,
30
+ elevation: ThemeConstants .elevation,
31
+ shape: RoundedRectangleBorder (
32
+ borderRadius: ThemeConstants .borderRadiusCircular,
33
+ ),
34
+ );
49
35
50
- final ExpansionTileThemeData _expansionTileThemeData =
51
- const ExpansionTileThemeData (tilePadding: EdgeInsets .zero, shape: Border ());
36
+ final DialogTheme _dialogTheme = DialogTheme (
37
+ elevation: ThemeConstants .elevation,
38
+ shape: RoundedRectangleBorder (
39
+ borderRadius: ThemeConstants .borderRadiusCircular,
40
+ ),
41
+ );
52
42
53
- final ListTileThemeData _listTileThemeData = const ListTileThemeData (contentPadding: EdgeInsets .zero);
43
+ final ExpansionTileThemeData _expansionTileThemeData = const ExpansionTileThemeData (
44
+ tilePadding: EdgeInsets .zero,
45
+ shape: Border (),
46
+ );
54
47
55
- ElevatedButtonThemeData get _elevatedButtonTheme => ElevatedButtonThemeData (
56
- style: ElevatedButton .styleFrom (
57
- elevation: ThemeConstants .elevation,
58
- minimumSize: const Size .fromHeight (kToolbarHeight),
59
- shape: RoundedRectangleBorder (
60
- borderRadius: ThemeConstants .borderRadiusCircular,
61
- ),
62
- ),
63
- );
48
+ final ListTileThemeData _listTileThemeData = const ListTileThemeData (
49
+ contentPadding: EdgeInsets .zero,
50
+ );
64
51
65
- InputDecorationTheme get _inputDecorationTheme {
66
- return InputDecorationTheme (
67
- border: OutlineInputBorder (
52
+ final ElevatedButtonThemeData _elevatedButtonTheme = ElevatedButtonThemeData (
53
+ style: ElevatedButton .styleFrom (
54
+ elevation: ThemeConstants .elevation,
55
+ minimumSize: const Size .fromHeight (kToolbarHeight),
56
+ shape: RoundedRectangleBorder (
68
57
borderRadius: ThemeConstants .borderRadiusCircular,
69
58
),
70
- );
71
- }
59
+ ),
60
+ );
61
+
62
+ final InputDecorationTheme _inputDecorationTheme = InputDecorationTheme (
63
+ border: OutlineInputBorder (
64
+ borderRadius: ThemeConstants .borderRadiusCircular,
65
+ ),
66
+ );
72
67
}
0 commit comments