-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.dart
More file actions
67 lines (64 loc) · 2.35 KB
/
Copy paththeme.dart
File metadata and controls
67 lines (64 loc) · 2.35 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import 'package:flex_color_scheme/flex_color_scheme.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'gen/theme/colors.helpis.dart';
const FlexSubThemesData _subThemeData = FlexSubThemesData(
blendOnLevel: 40,
useM2StyleDividerInM3: true,
thinBorderWidth: 1.5,
thickBorderWidth: 2.0,
unselectedToggleIsColored: true,
sliderTrackHeight: 2,
inputDecoratorBorderType: FlexInputBorderType.underline,
fabUseShape: true,
fabRadius: 60.0,
popupMenuElevation: 6.0,
popupMenuOpacity: 0.98,
tooltipWaitDuration: Duration(milliseconds: 300),
bottomNavigationBarOpacity: 0.98,
bottomNavigationBarElevation: 2.0,
navigationBarHeight: 75.0,
navigationBarLabelBehavior:
NavigationDestinationLabelBehavior.onlyShowSelected,
navigationRailElevation: 2.0,
);
extension Data on AppTheme {
/// App's theme config.
ThemeData get data => switch (this) {
AppTheme.rustLightTheme => FlexThemeData.light(
scheme: FlexScheme.vesuviusBurn,
surfaceMode: FlexSurfaceMode.highSurfaceLowScaffold,
blendLevel: 25,
appBarOpacity: 0.98,
appBarElevation: 6.0,
tabBarStyle: FlexTabBarStyle.forBackground,
subThemesData: _subThemeData,
keyColors: const FlexKeyColors(),
visualDensity: FlexColorScheme.comfortablePlatformDensity,
useMaterial3: true,
swapLegacyOnMaterial3: true,
fontFamily: GoogleFonts.ubuntu().fontFamily,
),
AppTheme.rustDarkTheme => FlexThemeData.dark(
colors: FlexColor
.schemes[FlexScheme.vesuviusBurn]!.light.defaultError
.toDark(5, true),
surfaceMode: FlexSurfaceMode.highSurfaceLowScaffold,
blendLevel: 25,
appBarOpacity: 0.98,
appBarElevation: 4.0,
tabBarStyle: FlexTabBarStyle.forBackground,
subThemesData: _subThemeData,
keyColors: const FlexKeyColors(),
visualDensity: FlexColorScheme.comfortablePlatformDensity,
useMaterial3: true,
swapLegacyOnMaterial3: true,
fontFamily: GoogleFonts.ubuntu().fontFamily,
),
}
.copyWith(
extensions: <ThemeExtension<UtilitiesExampleColors>>[
UtilitiesExampleColors(this),
],
);
}