yubioath-flutter/lib/theme.dart

66 lines
1.9 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
2022-02-21 19:07:52 +03:00
const primaryGreen = Color(0xffa8c86c);
2022-02-22 12:56:52 +03:00
const accentGreen = Color(0xff9aca3c);
const primaryBlue = Color(0xff325f74);
2022-02-21 19:07:52 +03:00
class AppTheme {
static ThemeData get lightTheme => ThemeData(
2022-03-28 15:59:07 +03:00
useMaterial3: true,
brightness: Brightness.light,
2022-02-22 12:56:52 +03:00
colorScheme:
ColorScheme.fromSwatch(brightness: Brightness.light).copyWith(
primary: primaryBlue,
secondary: accentGreen,
background: Colors.grey.shade200,
),
backgroundColor: Colors.white,
toggleableActiveColor: accentGreen,
appBarTheme: AppBarTheme(
elevation: 0.5,
backgroundColor: Colors.white,
foregroundColor: Colors.grey.shade800,
),
2022-04-05 17:36:03 +03:00
floatingActionButtonTheme: const FloatingActionButtonThemeData(
backgroundColor: primaryBlue,
),
2022-02-22 12:56:52 +03:00
textTheme: TextTheme(
bodyText1: TextStyle(
color: Colors.grey.shade600,
),
bodyText2: TextStyle(
color: Colors.grey.shade800,
),
2022-03-02 10:23:29 +03:00
headline2: TextStyle(
color: Colors.grey.shade800,
),
2022-02-22 12:56:52 +03:00
),
);
static ThemeData get darkTheme => ThemeData(
2022-03-28 15:59:07 +03:00
useMaterial3: true,
brightness: Brightness.dark,
colorScheme:
ColorScheme.fromSwatch(brightness: Brightness.dark).copyWith(
2022-02-21 19:07:52 +03:00
primary: primaryGreen,
secondary: primaryGreen,
),
2022-02-21 19:07:52 +03:00
toggleableActiveColor: primaryGreen,
2022-04-05 17:36:03 +03:00
floatingActionButtonTheme: FloatingActionButtonThemeData(
foregroundColor: Colors.grey.shade900,
backgroundColor: primaryGreen,
),
textTheme: TextTheme(
bodyText1: TextStyle(
color: Colors.grey.shade400,
),
bodyText2: TextStyle(
color: Colors.grey.shade500,
),
2022-03-02 10:23:29 +03:00
headline2: TextStyle(
color: Colors.grey.shade100,
),
),
);
}