first commit
This commit is contained in:
47 files changed
+3766
No files matched your search
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
enum AppThemeMode { light, dark, system }
|
||||
|
||||
class AppTheme {
|
||||
static const _primaryColor = Color(0xFF4CAF50);
|
||||
|
||||
static ThemeData get lightTheme => ThemeData(
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.light,
|
||||
colorSchemeSeed: _primaryColor,
|
||||
appBarTheme: const AppBarTheme(centerTitle: true),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||
filled: true,
|
||||
),
|
||||
);
|
||||
|
||||
static ThemeData get darkTheme => ThemeData(
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.dark,
|
||||
colorSchemeSeed: _primaryColor,
|
||||
appBarTheme: const AppBarTheme(centerTitle: true),
|
||||
scaffoldBackgroundColor: const Color(0xFF121212),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||
filled: true,
|
||||
),
|
||||
);
|
||||
|
||||
static ThemeMode toFlutterThemeMode(AppThemeMode mode) {
|
||||
switch (mode) {
|
||||
case AppThemeMode.light:
|
||||
return ThemeMode.light;
|
||||
case AppThemeMode.dark:
|
||||
return ThemeMode.dark;
|
||||
case AppThemeMode.system:
|
||||
return ThemeMode.system;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user