fix++
This commit is contained in:
parent
dfd82b32f6
commit
cd574e636c
7 changed files with 19 additions and 17 deletions
BIN
assets/icon.png
Normal file
BIN
assets/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
|
|
@ -112,7 +112,7 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isThemeLight = ref.watch(themeModeStateProvider);
|
||||
final isDarkTheme = ref.watch(themeModeStateProvider);
|
||||
final blendLevel = ref.watch(blendLevelStateProvider);
|
||||
final pureBlackDarkMode = ref.watch(pureBlackDarkModeStateProvider);
|
||||
ThemeData themeLight = FlexThemeData.light(
|
||||
|
|
@ -155,7 +155,7 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|||
final router = ref.watch(routerProvider);
|
||||
return MaterialApp.router(
|
||||
darkTheme: themeDark,
|
||||
themeMode: isThemeLight ? ThemeMode.light : ThemeMode.dark,
|
||||
themeMode: isDarkTheme ? ThemeMode.dark : ThemeMode.light,
|
||||
theme: themeLight,
|
||||
debugShowCheckedModeBanner: false,
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
|
|
|
|||
|
|
@ -89,15 +89,9 @@ class _HistoryScreenState extends ConsumerState<HistoryScreen> {
|
|||
width: 15,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
List<int> ids = [];
|
||||
for (var i = 0;
|
||||
i < entriesData.length;
|
||||
i++) {
|
||||
ids.add(entriesData[i].id!);
|
||||
}
|
||||
await isar.writeTxn(() async {
|
||||
await isar.historys.deleteAll(ids);
|
||||
onPressed: () {
|
||||
isar.writeTxnSync(() {
|
||||
isar.historys.clearSync();
|
||||
});
|
||||
if (mounted) {
|
||||
Navigator.pop(context);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,15 @@ class MoreScreen extends StatelessWidget {
|
|||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 150, child: Center(child: Text("LOGO"))),
|
||||
SizedBox(
|
||||
height: 200,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/icon.png",
|
||||
color: Theme.of(context).brightness == Brightness.light
|
||||
? Colors.black
|
||||
: Colors.white,
|
||||
))),
|
||||
const Divider(),
|
||||
// ListTile(
|
||||
// onTap: () {},
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ class FlexSchemeColorState extends _$FlexSchemeColorState {
|
|||
final flexSchemeColorIndex =
|
||||
isar.settings.getSync(227)!.flexSchemeColorIndex!;
|
||||
return ref.read(themeModeStateProvider)
|
||||
? ThemeAA.schemes[flexSchemeColorIndex].light
|
||||
: ThemeAA.schemes[flexSchemeColorIndex].dark;
|
||||
? ThemeAA.schemes[flexSchemeColorIndex].dark
|
||||
: ThemeAA.schemes[flexSchemeColorIndex].light;
|
||||
}
|
||||
|
||||
void setTheme(FlexSchemeColor color, int index) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class ThemeModeState extends _$ThemeModeState {
|
|||
|
||||
void setLightTheme() {
|
||||
final settings = isar.settings.getSync(227);
|
||||
state = true;
|
||||
state = false;
|
||||
ref.read(flexSchemeColorStateProvider.notifier).setTheme(
|
||||
ThemeAA.schemes[settings!.flexSchemeColorIndex!].light,
|
||||
settings.flexSchemeColorIndex!);
|
||||
|
|
@ -23,7 +23,7 @@ class ThemeModeState extends _$ThemeModeState {
|
|||
|
||||
void setDarkTheme() {
|
||||
final settings = isar.settings.getSync(227);
|
||||
state = false;
|
||||
state = true;
|
||||
ref.read(flexSchemeColorStateProvider.notifier).setTheme(
|
||||
ThemeAA.schemes[settings!.flexSchemeColorIndex!].dark,
|
||||
settings.flexSchemeColorIndex!);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class _DarkModeButtonState extends ConsumerState<DarkModeButton> {
|
|||
!isDark ? 'Off' : 'On',
|
||||
style: TextStyle(fontSize: 11, color: secondaryColor(context)),
|
||||
),
|
||||
value: !isDark,
|
||||
value: isDark,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue