diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 8a2e39a..ca60d65 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -368,6 +368,36 @@ "description": "Text displayed for cancel button, should be capitalized", "context": "Visible in the settings view" }, + "settingsThemeDevice": "Gerät", + "@settingsThemeDevice": { + "description": "Text displayed as description for device theme option", + "context": "Visible in the settings view" + }, + "settingsThemeOllama": "Ollama", + "@settingsThemeOllama": { + "description": "Text displayed as description for Ollama theme option", + "context": "Visible in the settings view" + }, + "settingsThemeRestartTitle": "Neustart Erforderlich", + "@settingsThemeRestartTitle": { + "description": "Title of the restart required dialog", + "context": "Visible in the settings view" + }, + "settingsThemeRestartDescription": "Das Ändern des Themas erfordert einen Neustart.\nMöchtest du jetzt neu starten oder die Aktion abbrechen?", + "@settingsThemeRestartDescription": { + "description": "Description of the restart required dialog", + "context": "Visible in the settings view" + }, + "settingsThemeRestartRestart": "Neustarten", + "@settingsThemeRestartRestart": { + "description": "Text displayed for restart button, should be capitalized", + "context": "Visible in the settings view" + }, + "settingsThemeRestartCancel": "Abbrechen", + "@settingsThemeRestartCancel": { + "description": "Text displayed for cancel button, should be capitalized", + "context": "Visible in the settings view" + }, "settingsVoicePermissionLoading": "Lade Sprachberechtigungen ...", "@settingsVoicePermissionLoading": { "description": "Text displayed while loading voice permissions", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index b81b6ea..561393c 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -368,6 +368,36 @@ "description": "Text displayed for cancel button, should be capitalized", "context": "Visible in the settings view" }, + "settingsThemeDevice": "Device", + "@settingsThemeDevice": { + "description": "Text displayed as description for device theme option", + "context": "Visible in the settings view" + }, + "settingsThemeOllama": "Ollama", + "@settingsThemeOllama": { + "description": "Text displayed as description for Ollama theme option", + "context": "Visible in the settings view" + }, + "settingsThemeRestartTitle": "Restart Required", + "@settingsThemeRestartTitle": { + "description": "Title of the restart required dialog", + "context": "Visible in the settings view" + }, + "settingsThemeRestartDescription": "Changing the theme requires a restart.\nDo you want to restart now or cancel the action?", + "@settingsThemeRestartDescription": { + "description": "Description of the restart required dialog", + "context": "Visible in the settings view" + }, + "settingsThemeRestartRestart": "Restart", + "@settingsThemeRestartRestart": { + "description": "Text displayed for restart button, should be capitalized", + "context": "Visible in the settings view" + }, + "settingsThemeRestartCancel": "Cancel", + "@settingsThemeRestartCancel": { + "description": "Text displayed for cancel button, should be capitalized", + "context": "Visible in the settings view" + }, "settingsVoicePermissionLoading": "Loading voice permissions ...", "@settingsVoicePermissionLoading": { "description": "Text displayed while loading voice permissions", diff --git a/lib/main.dart b/lib/main.dart index ebb7f42..c86f516 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -32,6 +32,7 @@ import 'package:flutter_displaymode/flutter_displaymode.dart'; import 'package:speech_to_text/speech_to_text.dart'; import 'package:flutter_tts/flutter_tts.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:dynamic_color/dynamic_color.dart'; // client configuration @@ -127,63 +128,109 @@ class _AppState extends State { } load(); - - WidgetsBinding.instance.addPostFrameCallback( - (timeStamp) { - if (!(prefs?.getBool("useDeviceTheme") ?? false)) { - theme = ThemeData.from( - colorScheme: const ColorScheme( - brightness: Brightness.light, - primary: Colors.black, - onPrimary: Colors.white, - secondary: Colors.white, - onSecondary: Colors.black, - error: Colors.red, - onError: Colors.white, - surface: Colors.white, - onSurface: Colors.black)); - themeDark = ThemeData.from( - colorScheme: const ColorScheme( - brightness: Brightness.dark, - primary: Colors.white, - onPrimary: Colors.black, - secondary: Colors.black, - onSecondary: Colors.white, - error: Colors.red, - onError: Colors.black, - surface: Colors.black, - onSurface: Colors.white)); - setState(() {}); - } - }, - ); } @override Widget build(BuildContext context) { - return MaterialApp( - localizationsDelegates: AppLocalizations.localizationsDelegates, - supportedLocales: AppLocalizations.supportedLocales, - localeListResolutionCallback: (deviceLocales, supportedLocales) { - if (deviceLocales != null) { - for (final locale in deviceLocales) { - var newLocale = Locale(locale.languageCode); - if (supportedLocales.contains(newLocale)) { - return locale; + return DynamicColorBuilder( + builder: (ColorScheme? lightDynamic, ColorScheme? darkDynamic) { + if ((prefs?.getBool("useDeviceTheme") ?? false) && + lightDynamic != null && + darkDynamic != null) { + theme = ThemeData.from(colorScheme: lightDynamic); + themeDark = ThemeData.from(colorScheme: darkDynamic); + } else { + theme = ThemeData.from( + colorScheme: const ColorScheme( + brightness: Brightness.light, + primary: Colors.black, + onPrimary: Colors.white, + secondary: Colors.white, + onSecondary: Colors.black, + error: Colors.red, + onError: Colors.white, + surface: Colors.white, + onSurface: Colors.black)); + themeDark = ThemeData.from( + colorScheme: const ColorScheme( + brightness: Brightness.dark, + primary: Colors.white, + onPrimary: Colors.black, + secondary: Colors.black, + onSecondary: Colors.white, + error: Colors.red, + onError: Colors.black, + surface: Colors.black, + onSurface: Colors.white)); + } + + WidgetsBinding.instance.addPostFrameCallback((_) { + WidgetsBinding.instance.platformDispatcher.onPlatformBrightnessChanged = + () { + // invert colors used, because brightness not updated yet + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( + systemNavigationBarColor: + (prefs?.getString("brightness") ?? "system") == "system" + ? ((MediaQuery.of(context).platformBrightness == + Brightness.light) + ? (themeDark ?? ThemeData.dark()).colorScheme.surface + : (theme ?? ThemeData()).colorScheme.surface) + : (prefs?.getString("brightness") == "dark" + ? (themeDark ?? ThemeData()).colorScheme.surface + : (theme ?? ThemeData.dark()).colorScheme.surface), + systemNavigationBarIconBrightness: + (((prefs?.getString("brightness") ?? "system") == "system" && + MediaQuery.of(context).platformBrightness == + Brightness.dark) || + prefs?.getString("brightness") == "light") + ? Brightness.dark + : Brightness.light)); + }; + + // brightness changed function not run at first startup + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( + systemNavigationBarColor: + (prefs?.getString("brightness") ?? "system") == "system" + ? ((MediaQuery.of(context).platformBrightness == + Brightness.light) + ? (theme ?? ThemeData.dark()).colorScheme.surface + : (themeDark ?? ThemeData()).colorScheme.surface) + : (prefs?.getString("brightness") == "dark" + ? (themeDark ?? ThemeData()).colorScheme.surface + : (theme ?? ThemeData.dark()).colorScheme.surface), + systemNavigationBarIconBrightness: + (((prefs?.getString("brightness") ?? "system") == "system" && + MediaQuery.of(context).platformBrightness == + Brightness.light) || + prefs?.getString("brightness") == "light") + ? Brightness.dark + : Brightness.light)); + }); + + return MaterialApp( + localizationsDelegates: AppLocalizations.localizationsDelegates, + supportedLocales: AppLocalizations.supportedLocales, + localeListResolutionCallback: (deviceLocales, supportedLocales) { + if (deviceLocales != null) { + for (final locale in deviceLocales) { + var newLocale = Locale(locale.languageCode); + if (supportedLocales.contains(newLocale)) { + return locale; + } } } - } - return const Locale("en"); - }, - title: "Ollama", - theme: theme, - darkTheme: themeDark, - themeMode: ((prefs?.getString("brightness") ?? "system") == "system") - ? ThemeMode.system - : ((prefs!.getString("brightness") == "dark") - ? ThemeMode.dark - : ThemeMode.light), - home: const MainApp()); + return const Locale("en"); + }, + title: "Ollama", + theme: theme, + darkTheme: themeDark, + themeMode: ((prefs?.getString("brightness") ?? "system") == "system") + ? ThemeMode.system + : ((prefs!.getString("brightness") == "dark") + ? ThemeMode.dark + : ThemeMode.light), + home: const MainApp()); + }); } } @@ -541,54 +588,6 @@ class _MainAppState extends State { })); } - void setBrightness() { - WidgetsBinding - .instance.platformDispatcher.onPlatformBrightnessChanged = () { - // invert colors used, because brightness not updated yet - SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( - systemNavigationBarColor: - (prefs!.getString("brightness") ?? "system") == "system" - ? ((MediaQuery.of(context).platformBrightness == - Brightness.light) - ? (themeDark ?? ThemeData.dark()) - .colorScheme - .surface - : (theme ?? ThemeData()).colorScheme.surface) - : (prefs!.getString("brightness") == "dark" - ? (themeDark ?? ThemeData()).colorScheme.surface - : (theme ?? ThemeData.dark()).colorScheme.surface), - systemNavigationBarIconBrightness: - (((prefs!.getString("brightness") ?? "system") == - "system" && - MediaQuery.of(context).platformBrightness == - Brightness.dark) || - prefs!.getString("brightness") == "light") - ? Brightness.dark - : Brightness.light)); - }; - - // brightness changed function not run at first startup - SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( - systemNavigationBarColor: - (prefs!.getString("brightness") ?? "system") == "system" - ? ((MediaQuery.of(context).platformBrightness == - Brightness.light) - ? (theme ?? ThemeData.dark()).colorScheme.surface - : (themeDark ?? ThemeData()).colorScheme.surface) - : (prefs!.getString("brightness") == "dark" - ? (themeDark ?? ThemeData()).colorScheme.surface - : (theme ?? ThemeData.dark()).colorScheme.surface), - systemNavigationBarIconBrightness: - (((prefs!.getString("brightness") ?? "system") == "system" && - MediaQuery.of(context).platformBrightness == - Brightness.light) || - prefs!.getString("brightness") == "light") - ? Brightness.dark - : Brightness.light)); - } - - setBrightness(); - // prefs!.remove("welcomeFinished"); if (!(prefs!.getBool("welcomeFinished") ?? false) && allowSettings) { // ignore: use_build_context_synchronously @@ -761,14 +760,16 @@ class _MainAppState extends State { ]), actions: [ TextButton( - onPressed: () {selectionHaptic(); + onPressed: () { + selectionHaptic(); Navigator.of(context).pop(); }, child: Text(AppLocalizations.of( context)! .deleteDialogCancel)), TextButton( - onPressed: () {selectionHaptic(); + onPressed: () { + selectionHaptic(); Navigator.of(context).pop(); for (var i = 0; @@ -1227,7 +1228,8 @@ class _MainAppState extends State { SizedBox( width: double.infinity, child: OutlinedButton.icon( - onPressed: () async {selectionHaptic(); + onPressed: () async { + selectionHaptic(); Navigator.of(context) .pop(); setMainState = setState; @@ -1248,7 +1250,8 @@ class _MainAppState extends State { SizedBox( width: double.infinity, child: OutlinedButton.icon( - onPressed: () async {selectionHaptic(); + onPressed: () async { + selectionHaptic(); Navigator.of(context) .pop(); @@ -1300,7 +1303,8 @@ class _MainAppState extends State { SizedBox( width: double.infinity, child: OutlinedButton.icon( - onPressed: () async {selectionHaptic(); + onPressed: () async { + selectionHaptic(); Navigator.of(context) .pop(); @@ -1379,17 +1383,26 @@ class _MainAppState extends State { attachmentButtonIcon: !multimodal ? (prefs?.getBool("voiceModeEnabled") ?? false) - ? const Icon(Icons.headphones_rounded) + ? Icon(Icons.headphones_rounded, + color: + Theme.of(context).iconTheme.color) : null - : const Icon(Icons.add_a_photo_rounded), + : Icon(Icons.add_a_photo_rounded, + color: Theme.of(context).iconTheme.color), sendButtonIcon: SizedBox( height: 24, child: CircleAvatar( backgroundColor: - Theme.of(context).colorScheme.primary, + Theme.of(context).iconTheme.color, radius: 12, - child: - const Icon(Icons.arrow_upward_rounded)), + child: Icon(Icons.arrow_upward_rounded, + color: + (prefs?.getBool("useDeviceTheme") ?? + false) + ? Theme.of(context) + .colorScheme + .surface + : null)), ), sendButtonMargin: EdgeInsets.zero, attachmentButtonMargin: EdgeInsets.zero, @@ -1414,8 +1427,7 @@ class _MainAppState extends State { Platform.isMacOS)) ? 0 : 8), - messageMaxWidth: (MediaQuery.of(context).size.width >= - 1000) + messageMaxWidth: (MediaQuery.of(context).size.width >= 1000) ? (MediaQuery.of(context).size.width >= 1600) ? (MediaQuery.of(context).size.width >= 2200) ? 1900 @@ -1428,17 +1440,23 @@ class _MainAppState extends State { secondaryColor: (themeDark ?? ThemeData.dark()).colorScheme.primary.withAlpha(20), attachmentButtonIcon: !multimodal ? (prefs?.getBool("voiceModeEnabled") ?? false) - ? const Icon(Icons.headphones_rounded) + ? Icon(Icons.headphones_rounded, color: Theme.of(context).iconTheme.color) : null - : const Icon(Icons.add_a_photo_rounded), + : Icon(Icons.add_a_photo_rounded, color: Theme.of(context).iconTheme.color), sendButtonIcon: SizedBox( height: 24, child: CircleAvatar( backgroundColor: - Theme.of(context).colorScheme.primary, + Theme.of(context).iconTheme.color, radius: 12, - child: - const Icon(Icons.arrow_upward_rounded)), + child: Icon(Icons.arrow_upward_rounded, + color: + (prefs?.getBool("useDeviceTheme") ?? + false) + ? Theme.of(context) + .colorScheme + .surface + : null)), ), sendButtonMargin: EdgeInsets.zero, attachmentButtonMargin: EdgeInsets.zero, diff --git a/lib/screen_settings.dart b/lib/screen_settings.dart index abe1483..19c007a 100644 --- a/lib/screen_settings.dart +++ b/lib/screen_settings.dart @@ -17,6 +17,7 @@ import 'settings/about.dart'; import 'package:dartx/dartx.dart'; import 'package:http/http.dart' as http; import 'package:bitsdojo_window/bitsdojo_window.dart'; +import 'package:dynamic_color/dynamic_color.dart'; Widget toggle(BuildContext context, String text, bool value, Function(bool value) onChanged, @@ -81,11 +82,22 @@ Widget toggle(BuildContext context, String text, bool value, } } : onChanged, + activeTrackColor: disabled + ? Theme.of(context).colorScheme.primary.withAlpha(50) + : null, trackOutlineColor: disabled - ? const WidgetStatePropertyAll(Colors.grey) + ? WidgetStatePropertyAll(Theme.of(context) + .colorScheme + .primary + .withAlpha(150) + .harmonizeWith( + Theme.of(context).colorScheme.primary)) : null, thumbColor: disabled - ? const WidgetStatePropertyAll(Colors.grey) + ? WidgetStatePropertyAll(Theme.of(context) + .colorScheme + .primary + .withAlpha(150)) : null))) ]), ]), @@ -364,8 +376,12 @@ class _ScreenSettingsState extends State { splashFactory: NoSplash.splashFactory, child: Row( children: [ - const Icon(Icons.error_rounded, - color: Colors.red), + Icon(Icons.error_rounded, + color: Colors.red + .harmonizeWith( + Theme.of(context) + .colorScheme + .primary)), const SizedBox(width: 8), Text( AppLocalizations.of(context)! @@ -373,8 +389,12 @@ class _ScreenSettingsState extends State { hostInvalidHost ? "host" : "url"), - style: const TextStyle( - color: Colors.red)) + style: TextStyle( + color: Colors.red + .harmonizeWith( + Theme.of(context) + .colorScheme + .primary))) ], )) : null, @@ -402,15 +422,24 @@ class _ScreenSettingsState extends State { ) : Row( children: [ - const Icon(Icons.check_rounded, - color: Colors.green), + Icon(Icons.check_rounded, + color: Colors.green + .harmonizeWith( + Theme.of(context) + .colorScheme + .primary)), const SizedBox(width: 8), Text( AppLocalizations.of( context)! .settingsHostValid, - style: const TextStyle( - color: Colors.green, + style: TextStyle( + color: Colors.green + .harmonizeWith( + Theme.of( + context) + .colorScheme + .primary), fontFamily: "monospace")) ], @@ -481,7 +510,8 @@ class _ScreenSettingsState extends State { .settingsSavedAutomatically, Icons.info_rounded, null, - color: Colors.grey) + color: Colors.grey.harmonizeWith( + Theme.of(context).colorScheme.primary)) ]))))); } } diff --git a/lib/settings/behavior.dart b/lib/settings/behavior.dart index d467980..c3f8589 100644 --- a/lib/settings/behavior.dart +++ b/lib/settings/behavior.dart @@ -8,6 +8,7 @@ import '../screen_settings.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:bitsdojo_window/bitsdojo_window.dart'; +import 'package:dynamic_color/dynamic_color.dart'; class ScreenSettingsBehavior extends StatefulWidget { const ScreenSettingsBehavior({super.key}); @@ -116,7 +117,8 @@ class _ScreenSettingsBehaviorState extends State { .settingsBehaviorNotUpdatedForOlderChats, Icons.info_rounded, null, - color: Colors.grey) + color: Colors.grey + .harmonizeWith(Theme.of(context).colorScheme.primary)) ]))), ); } diff --git a/lib/settings/export.dart b/lib/settings/export.dart index aeb99ed..c4effaa 100644 --- a/lib/settings/export.dart +++ b/lib/settings/export.dart @@ -11,6 +11,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:bitsdojo_window/bitsdojo_window.dart'; import 'package:file_picker/file_picker.dart'; import 'package:intl/intl.dart'; +import 'package:dynamic_color/dynamic_color.dart'; class ScreenSettingsExport extends StatefulWidget { const ScreenSettingsExport({super.key}); @@ -169,10 +170,12 @@ class _ScreenSettingsExportState extends State { const SizedBox(height: 16), button(AppLocalizations.of(context)!.settingsExportInfo, Icons.info_rounded, null, - color: Colors.grey), + color: Colors.grey + .harmonizeWith(Theme.of(context).colorScheme.primary)), button(AppLocalizations.of(context)!.settingsExportWarning, Icons.warning_rounded, null, - color: Colors.orange) + color: Colors.orange + .harmonizeWith(Theme.of(context).colorScheme.primary)) ]))), ); } diff --git a/lib/settings/interface.dart b/lib/settings/interface.dart index 899e4fd..13b6d43 100644 --- a/lib/settings/interface.dart +++ b/lib/settings/interface.dart @@ -1,7 +1,6 @@ import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import '../main.dart'; import '../worker/haptic.dart'; @@ -367,6 +366,72 @@ class _ScreenSettingsInterfaceState extends State { }); }); }), + const SizedBox(height: 8), + SegmentedButton( + segments: [ + ButtonSegment( + value: "device", + label: Text(AppLocalizations.of(context)! + .settingsThemeDevice), + icon: const Icon(Icons.devices_rounded)), + ButtonSegment( + value: "ollama", + label: Text(AppLocalizations.of(context)! + .settingsThemeOllama), + icon: const ImageIcon( + AssetImage("assets/logo512.png"))) + ], + selected: { + (prefs?.getBool("useDeviceTheme") ?? false) + ? "device" + : "ollama" + }, + onSelectionChanged: (p0) { + selectionHaptic(); + showDialog( + context: context, + builder: (context) { + return StatefulBuilder( + builder: (context, setLocalState) { + return AlertDialog( + title: Text(AppLocalizations.of(context)! + .settingsThemeRestartTitle), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text(AppLocalizations.of(context)! + .settingsThemeRestartDescription), + ]), + actions: [ + TextButton( + onPressed: () { + selectionHaptic(); + Navigator.of(context).pop(); + }, + child: Text(AppLocalizations.of( + context)! + .settingsThemeRestartCancel)), + TextButton( + onPressed: () async { + selectionHaptic(); + await prefs!.setBool( + "useDeviceTheme", + p0.elementAt(0) == "device"); + if (Platform.isWindows || + Platform.isLinux || + Platform.isMacOS) { + exit(0); + } else { + Restart.restartApp(); + } + }, + child: Text(AppLocalizations.of( + context)! + .settingsThemeRestartRestart)) + ]); + }); + }); + }), const SizedBox(height: 16) ]), ) diff --git a/lib/settings/voice.dart b/lib/settings/voice.dart index 10206ea..b39a516 100644 --- a/lib/settings/voice.dart +++ b/lib/settings/voice.dart @@ -10,6 +10,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:bitsdojo_window/bitsdojo_window.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:dynamic_color/dynamic_color.dart'; class ScreenSettingsVoice extends StatefulWidget { const ScreenSettingsVoice({super.key}); @@ -329,7 +330,9 @@ class _ScreenSettingsVoiceState extends State { .settingsExperimentalBetaFeature, Icons.warning_rounded, null, - color: Colors.orange, onLongTap: () { + color: Colors.orange + .harmonizeWith(Theme.of(context).colorScheme.primary), + onLongTap: () { selectionHaptic(); ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text(AppLocalizations.of(context)! diff --git a/lib/worker/setter.dart b/lib/worker/setter.dart index 6131370..5852878 100644 --- a/lib/worker/setter.dart +++ b/lib/worker/setter.dart @@ -164,7 +164,10 @@ void setModel(BuildContext context, Function setState) { ? const Icon(Icons .collections_rounded) : null)), - checkmarkColor: (usedIndex == index) + checkmarkColor: (usedIndex == index && + !(prefs?.getBool( + "useDeviceTheme") ?? + false)) ? ((MediaQuery.of(context) .platformBrightness == Brightness.light) @@ -175,7 +178,10 @@ void setModel(BuildContext context, Function setState) { .colorScheme .secondary) : null, - labelStyle: (usedIndex == index) + labelStyle: (usedIndex == index && + !(prefs?.getBool( + "useDeviceTheme") ?? + false)) ? TextStyle( color: (MediaQuery.of(context) .platformBrightness == @@ -188,15 +194,19 @@ void setModel(BuildContext context, Function setState) { .colorScheme .secondary) : null, - selectedColor: (MediaQuery.of(context) - .platformBrightness == - Brightness.light) - ? (theme ?? ThemeData()) - .colorScheme - .primary - : (themeDark ?? ThemeData.dark()) - .colorScheme - .primary, + selectedColor: (prefs + ?.getBool("useDeviceTheme") ?? + false) + ? null + : (MediaQuery.of(context) + .platformBrightness == + Brightness.light) + ? (theme ?? ThemeData()) + .colorScheme + .primary + : (themeDark ?? ThemeData.dark()) + .colorScheme + .primary, onSelected: (bool selected) { selectionHaptic(); if (addIndex == index) { diff --git a/pubspec.lock b/pubspec.lock index 545183e..a0395f5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -153,6 +153,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + dynamic_color: + dependency: "direct main" + description: + name: dynamic_color + sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d + url: "https://pub.dev" + source: hosted + version: "1.7.0" equatable: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8ce670d..6c08e5a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -42,6 +42,7 @@ dependencies: flutter_tts: ^4.0.2 permission_handler: ^11.3.1 datetime_loop: ^1.2.0 + dynamic_color: ^1.7.0 dev_dependencies: flutter_test: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 08aa015..11facde 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,6 +7,7 @@ #include "generated_plugin_registrant.h" #include +#include #include #include #include @@ -15,6 +16,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { BitsdojoWindowPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("BitsdojoWindowPlugin")); + DynamicColorPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); FileSelectorWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSelectorWindows")); FlutterTtsPluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 9f559f3..02ed174 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST bitsdojo_window_windows + dynamic_color file_selector_windows flutter_tts permission_handler_windows