Files
FlutterUnit/lib/app/res/app_theme.dart
2022-04-01 20:37:44 +08:00

30 lines
1022 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_unit/app/blocs/global/global_state.dart';
class AppTheme {
static ThemeData darkTheme(GlobalState state) => ThemeData(
fontFamily: state.fontFamily,
brightness: Brightness.dark,
primaryColor: Color(0xff4699FB),
appBarTheme: const AppBarTheme(backgroundColor: Color(0xff222222)),
floatingActionButtonTheme: FloatingActionButtonThemeData(
foregroundColor: Colors.white,
backgroundColor: Color(0xff4699FB)
),
dividerColor: Colors.white,
// switchTheme: SwitchThemeData(
// // trackColor: '',
// ),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Color(0xff181818),
selectedItemColor: Color(0xff4699FB)),
scaffoldBackgroundColor: const Color(0xff010201));
static ThemeData lightTheme(GlobalState state) {
return ThemeData(
fontFamily: state.fontFamily,
primarySwatch: state.themeColor,
);
}
}