mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 16:30:40 +00:00
FVM fix
This commit is contained in:
parent
42fe5d45bc
commit
179008ff77
2 changed files with 18 additions and 8 deletions
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"task.slowProviderWarning": true,
|
||||
"dart.flutterSdkPaths": [
|
||||
"fvm"
|
||||
],
|
||||
"dart.flutterSdkPath": "fvm",
|
||||
"search.exclude": {
|
||||
"**/.fvm": true
|
||||
},
|
||||
"files.watcherExclude": {
|
||||
"**/.fvm": true
|
||||
},
|
||||
"dart.lineLength": 100,
|
||||
"[dart]": {
|
||||
"editor.formatOnSave": true,
|
||||
|
@ -20,5 +24,5 @@
|
|||
"dart.doNotFormat": [
|
||||
"**/generated/**",
|
||||
"lib/data/**"
|
||||
]
|
||||
],
|
||||
}
|
|
@ -26,7 +26,7 @@ class ThemeProvider extends StatefulWidget {
|
|||
|
||||
class ThemeProviderState extends State<ThemeProvider> {
|
||||
UserPreferencesService get _prefs => context.read<UserPreferencesService>();
|
||||
|
||||
|
||||
late final _themeTypeNotifier = ValueNotifier<ThemeType>(_prefs.themeType);
|
||||
late final _dynamicColorNotifier = ValueNotifier<bool>(_prefs.dynamicColor);
|
||||
late final _primaryColorNotifier = ValueNotifier<Color>(const Color(0xFF2196f3));
|
||||
|
@ -159,6 +159,7 @@ class _ThemeDataProvider extends StatelessWidget {
|
|||
final scheme = brightness == Brightness.light
|
||||
? Scheme.light(primaryColor.value)
|
||||
: Scheme.dark(primaryColor.value);
|
||||
|
||||
return ColorScheme(
|
||||
brightness: brightness,
|
||||
primary: Color(scheme.primary),
|
||||
|
@ -171,10 +172,15 @@ class _ThemeDataProvider extends StatelessWidget {
|
|||
onError: Color(scheme.onError),
|
||||
background: Color(scheme.background),
|
||||
onBackground: Color(scheme.onBackground),
|
||||
surface: Color.alphaBlend(Color(scheme.primary).withOpacity(0.05), Color(scheme.background)),
|
||||
surface: Color.alphaBlend(
|
||||
Color(scheme.primary).withOpacity(0.05),
|
||||
Color(scheme.background),
|
||||
),
|
||||
onSurface: Color(scheme.onSurface),
|
||||
surfaceVariant:
|
||||
Color.alphaBlend(Color(scheme.primary).withOpacity(0.5), Color(scheme.background)),
|
||||
surfaceVariant: Color.alphaBlend(
|
||||
Color(scheme.primary).withOpacity(0.5),
|
||||
Color(scheme.background),
|
||||
),
|
||||
onSurfaceVariant: Color(scheme.onSurfaceVariant),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue