first commit

This commit is contained in:
ZV committed 2026-08-27 15:41:11 +08:00
commit 90f6d120eb
47 files changed
+3766

No files matched your search

+41
View File
@@ -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;
}
}
}