feat: implementovat Material 3 a upravit systém lokalizací #37
2 changed files with 74 additions and 7 deletions
69
lib/color_schemes.g.dart
Normal file
69
lib/color_schemes.g.dart
Normal file
|
@ -0,0 +1,69 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
const lightColorScheme = ColorScheme(
|
||||
brightness: Brightness.light,
|
||||
primary: Color(0xFF5F52A7),
|
||||
onPrimary: Color(0xFFFFFFFF),
|
||||
primaryContainer: Color(0xFFE5DEFF),
|
||||
onPrimaryContainer: Color(0xFF1A0261),
|
||||
secondary: Color(0xFF5F5C71),
|
||||
onSecondary: Color(0xFFFFFFFF),
|
||||
secondaryContainer: Color(0xFFE5DFF9),
|
||||
onSecondaryContainer: Color(0xFF1C192B),
|
||||
tertiary: Color(0xFF763EC3),
|
||||
onTertiary: Color(0xFFFFFFFF),
|
||||
tertiaryContainer: Color(0xFFEDDCFF),
|
||||
onTertiaryContainer: Color(0xFF290056),
|
||||
error: Color(0xFFBA1A1A),
|
||||
errorContainer: Color(0xFFFFDAD6),
|
||||
onError: Color(0xFFFFFFFF),
|
||||
onErrorContainer: Color(0xFF410002),
|
||||
background: Color(0xFFFFFBFF),
|
||||
onBackground: Color(0xFF1C1B1F),
|
||||
surface: Color(0xFFFFFBFF),
|
||||
onSurface: Color(0xFF1C1B1F),
|
||||
surfaceVariant: Color(0xFFE5E0EC),
|
||||
onSurfaceVariant: Color(0xFF48454E),
|
||||
outline: Color(0xFF79767F),
|
||||
onInverseSurface: Color(0xFFF4EFF4),
|
||||
inverseSurface: Color(0xFF313033),
|
||||
inversePrimary: Color(0xFFC8BFFF),
|
||||
shadow: Color(0xFF000000),
|
||||
surfaceTint: Color(0xFF5F52A7),
|
||||
outlineVariant: Color(0xFFC9C5D0),
|
||||
scrim: Color(0xFF000000),
|
||||
);
|
||||
|
||||
const darkColorScheme = ColorScheme(
|
||||
brightness: Brightness.dark,
|
||||
primary: Color(0xFFC8BFFF),
|
||||
onPrimary: Color(0xFF302175),
|
||||
primaryContainer: Color(0xFF473A8D),
|
||||
onPrimaryContainer: Color(0xFFE5DEFF),
|
||||
secondary: Color(0xFFC9C3DC),
|
||||
onSecondary: Color(0xFF312E41),
|
||||
secondaryContainer: Color(0xFF484459),
|
||||
onSecondaryContainer: Color(0xFFE5DFF9),
|
||||
tertiary: Color(0xFFD7BAFF),
|
||||
onTertiary: Color(0xFF440088),
|
||||
tertiaryContainer: Color(0xFF5D20A9),
|
||||
onTertiaryContainer: Color(0xFFEDDCFF),
|
||||
error: Color(0xFFFFB4AB),
|
||||
errorContainer: Color(0xFF93000A),
|
||||
onError: Color(0xFF690005),
|
||||
onErrorContainer: Color(0xFFFFDAD6),
|
||||
background: Color(0xFF1C1B1F),
|
||||
onBackground: Color(0xFFE5E1E6),
|
||||
surface: Color(0xFF1C1B1F),
|
||||
onSurface: Color(0xFFE5E1E6),
|
||||
surfaceVariant: Color(0xFF48454E),
|
||||
onSurfaceVariant: Color(0xFFC9C5D0),
|
||||
outline: Color(0xFF938F99),
|
||||
onInverseSurface: Color(0xFF1C1B1F),
|
||||
inverseSurface: Color(0xFFE5E1E6),
|
||||
inversePrimary: Color(0xFF5F52A7),
|
||||
shadow: Color(0xFF000000),
|
||||
surfaceTint: Color(0xFFC8BFFF),
|
||||
outlineVariant: Color(0xFF48454E),
|
||||
scrim: Color(0xFF000000),
|
||||
);
|
|
@ -17,7 +17,7 @@ import 'package:timezone/timezone.dart' as tz;
|
|||
|
||||
import 'lang/lang.dart';
|
||||
import 'lang/lang_en.dart';
|
||||
|
||||
import 'color_schemes.g.dart';
|
||||
/*
|
||||
Copyright (C) 2022 Matyáš Caras a přispěvatelé
|
||||
|
||||
|
@ -135,13 +135,11 @@ class MyApp extends StatelessWidget {
|
|||
],
|
||||
supportedLocales: const [Locale("cs", ""), Locale("en", "")],
|
||||
title: "OpenCanteen",
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.purple,
|
||||
),
|
||||
theme: ThemeData(useMaterial3: true, colorScheme: lightColorScheme),
|
||||
darkTheme: ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
primarySwatch: Colors.purple,
|
||||
),
|
||||
brightness: Brightness.dark,
|
||||
useMaterial3: true,
|
||||
colorScheme: darkColorScheme),
|
||||
home: const LoginPage(),
|
||||
)
|
||||
: const CupertinoApp(
|
||||
|
|
Reference in a new issue