Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Update dependencies and cursor color
Browse files Browse the repository at this point in the history
  • Loading branch information
phantomate committed Sep 15, 2024
1 parent 71e0c06 commit 2b2ef1e
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 118 deletions.
20 changes: 18 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,24 @@ class Tare extends StatelessWidget {
],
debugShowCheckedModeBanner: false,
title: 'UnTaRe App',
theme: AppTheme.lightTheme.copyWith(primaryColor: Color(settingsCubit.state.materialHexColor), useMaterial3: false),
darkTheme: AppTheme.darkTheme.copyWith(primaryColor: Color(settingsCubit.state.materialHexColor), useMaterial3: false),
theme: AppTheme.lightTheme.copyWith(
primaryColor: Color(settingsCubit.state.materialHexColor),
textSelectionTheme: TextSelectionThemeData(
cursorColor: Color(settingsCubit.state.materialHexColor),
selectionColor: Color(settingsCubit.state.materialHexColor),
selectionHandleColor: Color(settingsCubit.state.materialHexColor),
),
useMaterial3: false
),
darkTheme: AppTheme.darkTheme.copyWith(
primaryColor: Color(settingsCubit.state.materialHexColor),
textSelectionTheme: TextSelectionThemeData(
cursorColor: Color(settingsCubit.state.materialHexColor),
selectionColor: Color(settingsCubit.state.materialHexColor),
selectionHandleColor: Color(settingsCubit.state.materialHexColor),
),
useMaterial3: false
),
themeMode: themeMode,
home: (state is AuthenticationAuthenticated)
? const TarePage()
Expand Down
10 changes: 5 additions & 5 deletions lib/pages/recipe_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:untare/components/loading_component.dart';
import 'package:untare/models/keyword.dart';
import 'package:untare/models/recipe.dart';
import 'package:untare/extensions/int_extension.dart';
import 'package:wakelock/wakelock.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

class RecipeDetailPage extends StatefulWidget {
final Recipe recipe;
Expand All @@ -36,7 +36,7 @@ class RecipeDetailPageState extends State<RecipeDetailPage> with WidgetsBindingO
recipe = widget.recipe;
recipeBloc = BlocProvider.of<RecipeBloc>(context);
recipeBloc.add(FetchRecipe(id: recipe.id!));
Wakelock.disable();
WakelockPlus.disable();
WidgetsBinding.instance.addObserver(this);
}

Expand All @@ -63,7 +63,7 @@ class RecipeDetailPageState extends State<RecipeDetailPage> with WidgetsBindingO
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
Wakelock.disable();
WakelockPlus.disable();
return true;
},
child: Scaffold(
Expand Down Expand Up @@ -144,7 +144,7 @@ class RecipeDetailPageState extends State<RecipeDetailPage> with WidgetsBindingO
iconSize: 30,
padding: const EdgeInsets.all(0),
onPressed: () {
Wakelock.disable();
WakelockPlus.disable();
Navigator.pop(hsbContext);
},
splashRadius: 20,
Expand Down Expand Up @@ -173,7 +173,7 @@ class RecipeDetailPageState extends State<RecipeDetailPage> with WidgetsBindingO
),
);

Wakelock.toggle(enable: isScreenLocked);
WakelockPlus.toggle(enable: isScreenLocked);
},
icon: isScreenLocked ? const Icon(Icons.lock_outline) : const Icon(Icons.lock_open_outlined),
),
Expand Down
6 changes: 4 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ import FlutterMacOS
import Foundation

import file_selector_macos
import package_info_plus
import path_provider_foundation
import share_plus
import sqflite
import url_launcher_macos
import wakelock_macos
import wakelock_plus

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
}
Loading

0 comments on commit 2b2ef1e

Please sign in to comment.