117 lines
3.8 KiB
Dart
117 lines
3.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class AppTheme {
|
|
static const _blue = Color(0xFF2563EB);
|
|
|
|
static ThemeData light() {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.light,
|
|
colorSchemeSeed: _blue,
|
|
scaffoldBackgroundColor: Colors.white,
|
|
textTheme: GoogleFonts.notoSansTextTheme(),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Colors.white,
|
|
foregroundColor: Color(0xFF1F2937),
|
|
elevation: 0,
|
|
scrolledUnderElevation: 1,
|
|
),
|
|
cardTheme: const CardThemeData(
|
|
color: Color(0xFFF9FAFB),
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.all(Radius.circular(16)),
|
|
),
|
|
),
|
|
floatingActionButtonTheme: const FloatingActionButtonThemeData(
|
|
backgroundColor: _blue,
|
|
foregroundColor: Colors.white,
|
|
elevation: 4,
|
|
shape: CircleBorder(),
|
|
),
|
|
bottomSheetTheme: const BottomSheetThemeData(
|
|
backgroundColor: Colors.white,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
|
|
),
|
|
),
|
|
dividerTheme: const DividerThemeData(
|
|
color: Color(0xFFE5E7EB),
|
|
thickness: 1,
|
|
space: 0,
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: Color(0xFFE5E7EB)),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: Color(0xFFE5E7EB)),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: _blue, width: 2),
|
|
),
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
),
|
|
);
|
|
}
|
|
|
|
static ThemeData dark() {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
colorSchemeSeed: _blue,
|
|
scaffoldBackgroundColor: const Color(0xFF121212),
|
|
textTheme: GoogleFonts.notoSansTextTheme(ThemeData.dark().textTheme),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Color(0xFF121212),
|
|
foregroundColor: Color(0xFFE5E7EB),
|
|
elevation: 0,
|
|
scrolledUnderElevation: 1,
|
|
),
|
|
cardTheme: const CardThemeData(
|
|
color: Color(0xFF1E1E1E),
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.all(Radius.circular(16)),
|
|
),
|
|
),
|
|
floatingActionButtonTheme: const FloatingActionButtonThemeData(
|
|
backgroundColor: _blue,
|
|
foregroundColor: Colors.white,
|
|
elevation: 4,
|
|
shape: CircleBorder(),
|
|
),
|
|
bottomSheetTheme: const BottomSheetThemeData(
|
|
backgroundColor: Color(0xFF1E1E1E),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
|
|
),
|
|
),
|
|
dividerTheme: const DividerThemeData(
|
|
color: Color(0xFF374151),
|
|
thickness: 1,
|
|
space: 0,
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: Color(0xFF374151)),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: Color(0xFF374151)),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: _blue, width: 2),
|
|
),
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
),
|
|
);
|
|
}
|
|
}
|