loris/lib/themes/themes.dart

34 lines
1 KiB
Dart
Raw Normal View History

2022-07-02 17:32:44 +00:00
import 'package:flutter/material.dart';
2022-07-02 22:03:10 +00:00
import 'dracula.dart' as color_dracula;
2022-07-02 17:32:44 +00:00
2022-07-02 22:03:10 +00:00
final available = [color_dracula.theme];
ThemeData getTheme(CustomColors colors) {
return ThemeData(
scaffoldBackgroundColor: colors.colorScheme.background,
bottomAppBarColor: colors.colorScheme.background,
hintColor: colors.hintColor,
colorScheme: colors.colorScheme,
errorColor: colors.colorScheme.error,
bottomAppBarTheme: BottomAppBarTheme(
color: colors.colorScheme.surface,
shape: const CircularNotchedRectangle(),
elevation: 0,
),
navigationBarTheme: const NavigationBarThemeData(
backgroundColor: Colors.transparent,
labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected,
indicatorColor: Colors.transparent,
elevation: 0,
height: 64,
),
2022-07-03 20:02:57 +00:00
scrollbarTheme: const ScrollbarThemeData(),
2022-07-02 22:03:10 +00:00
);
}
class CustomColors {
late String name;
late Color hintColor;
late ColorScheme colorScheme;
CustomColors(this.name, this.hintColor, this.colorScheme);
}