diff --git a/lib/app.dart b/lib/app.dart index 5762a409..c2b507f2 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -1,4 +1,3 @@ -import 'package:dynamic_color/dynamic_color.dart'; import 'package:flutter/foundation.dart'; // ignore: unused_import import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -28,51 +27,57 @@ class ParApp extends StatelessWidget { distinct: true, converter: _ViewModel.fromStore, onInit: store.dispatch(AppStartedAction()), - builder: (context, vm) => DynamicColorBuilder( - builder: (lightDynamic, darkDynamic) { - final override = vm.overrideColour; - const defaultColour = Color(0xFF34558B); + builder: (context, vm) { + ColorScheme lightColorScheme = ColorScheme.fromSeed( + seedColor: Color(0xFF34558B), + secondary: Color(0xFF00A4B8), + tertiary: Color(0xFF8BE585), + ); - ColorScheme lightColorScheme; - ColorScheme darkColorScheme; + ColorScheme darkColorScheme = ColorScheme.fromSeed( + brightness: Brightness.dark, + seedColor: Color(0xFF93920B), + secondary: Color(0xFF00623F), + tertiary: Color(0xFF257F1F), + ); - if (lightDynamic != null && darkDynamic != null) { - lightColorScheme = - lightDynamic.harmonized().copyWith(secondary: override); - darkColorScheme = - darkDynamic.harmonized().copyWith(secondary: override); - } else { - // Otherwise, use fallback schemes. - lightColorScheme = - ColorScheme.fromSeed(seedColor: override ?? defaultColour); - darkColorScheme = ColorScheme.fromSeed( - seedColor: override ?? defaultColour, - brightness: Brightness.dark); - } + // Light theme colors for reference + Color(0xFF34558B); + Color(0xFF007DAF); + Color(0xFF00A4B8); + Color(0xFF00C8A5); + Color(0xFF8BE585); + Color(0xFFF9F871); - return MaterialApp.router( - title: 'Grup', - localizationsDelegates: const [ - ...AppLocalizations.localizationsDelegates, - FormBuilderLocalizations.delegate, - SupabaseAuthUILocalizations.delegate, - ], - supportedLocales: AppLocalizations.supportedLocales, - themeMode: vm.themeMode, - locale: vm.locale, - darkTheme: ThemeData( - colorScheme: darkColorScheme, - fontFamily: GoogleFonts.cabin().fontFamily, - ), - theme: ThemeData( - // TODO(borgoat): dynamic color scheme using dynamic_color package - colorScheme: lightColorScheme, - fontFamily: GoogleFonts.cabin().fontFamily, - ), - routerConfig: router, - ); - }, - ), + // Dark theme colors for reference + Color(0xFF000025); + Color(0xFF001749); + Color(0xFF003E52); + Color(0xFF00623F); + Color(0xFF257F1F); + Color(0xFF93920B); + + return MaterialApp.router( + title: 'Grup', + localizationsDelegates: const [ + ...AppLocalizations.localizationsDelegates, + FormBuilderLocalizations.delegate, + SupabaseAuthUILocalizations.delegate, + ], + supportedLocales: AppLocalizations.supportedLocales, + themeMode: vm.themeMode, + locale: vm.locale, + darkTheme: ThemeData( + colorScheme: darkColorScheme, + fontFamily: GoogleFonts.cabin().fontFamily, + ), + theme: ThemeData( + colorScheme: lightColorScheme, + fontFamily: GoogleFonts.cabin().fontFamily, + ), + routerConfig: router, + ); + }, ), ); } @@ -83,14 +88,12 @@ sealed class _ViewModel with _$ViewModel { const factory _ViewModel({ required ThemeMode themeMode, Locale? locale, - Color? overrideColour, }) = __ViewModel; factory _ViewModel.fromStore(Store store) { return _ViewModel( themeMode: themeModeSelector(store.state), locale: localeSelector(store.state), - overrideColour: null, // TODO Where could this come from? ); } } diff --git a/lib/presentation/screens/auth.dart b/lib/presentation/screens/auth.dart index 722f5982..fc95e2c2 100644 --- a/lib/presentation/screens/auth.dart +++ b/lib/presentation/screens/auth.dart @@ -23,6 +23,7 @@ class AuthScreen extends StatelessWidget { style: GoogleFonts.sniglet( color: theme.colorScheme.primary, textStyle: theme.textTheme.headlineLarge, + fontWeight: FontWeight.bold, ), ), // TODO(borgoat): this shouldn't be needed: fix the navigation stack instead diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e7f80266..e12c657b 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,15 +6,11 @@ #include "generated_plugin_registrant.h" -#include #include #include #include void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) dynamic_color_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); - dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); file_selector_plugin_register_with_registrar(file_selector_linux_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index f659fb16..44535824 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - dynamic_color file_selector_linux gtk url_launcher_linux diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 51890a42..c2769b26 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,6 @@ import FlutterMacOS import Foundation import app_links -import dynamic_color import file_selector_macos import google_sign_in_ios import path_provider_foundation @@ -17,7 +16,6 @@ import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) - DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 1ea445a5..db3e641f 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -7,8 +7,6 @@ PODS: - AppAuth/Core (1.7.6) - AppAuth/ExternalUserAgent (1.7.6): - AppAuth/Core - - dynamic_color (0.0.2): - - FlutterMacOS - file_selector_macos (0.0.1): - FlutterMacOS - FlutterMacOS (1.0.0) @@ -45,7 +43,6 @@ PODS: DEPENDENCIES: - app_links (from `Flutter/ephemeral/.symlinks/plugins/app_links/macos`) - - dynamic_color (from `Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos`) - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - google_sign_in_ios (from `Flutter/ephemeral/.symlinks/plugins/google_sign_in_ios/darwin`) @@ -65,8 +62,6 @@ SPEC REPOS: EXTERNAL SOURCES: app_links: :path: Flutter/ephemeral/.symlinks/plugins/app_links/macos - dynamic_color: - :path: Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos file_selector_macos: :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos FlutterMacOS: @@ -85,21 +80,20 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos SPEC CHECKSUMS: - app_links: 9028728e32c83a0831d9db8cf91c526d16cc5468 + app_links: 10e0a0ab602ffaf34d142cd4862f29d34b303b2a AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73 - dynamic_color: b820c000cc68df65e7ba7ff177cb98404ce56651 - file_selector_macos: 6280b52b459ae6c590af5d78fc35c7267a3c4b31 + file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - google_sign_in_ios: 0ab078e60da6dfe23cbc55c83502b52bba1aad63 + google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38 GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 - path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 - share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc - shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 - sign_in_with_apple: 6673c03c9e3643f6c8d33601943fbfa9ae99f94e - url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + share_plus: 1fa619de8392a4398bfaf176d441853922614e89 + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + sign_in_with_apple: a9e97e744e8edc36aefc2723111f652102a7a727 + url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3 -COCOAPODS: 1.16.2 +COCOAPODS: 1.15.2 diff --git a/pubspec.lock b/pubspec.lock index fbb1bf75..60f55ff4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -318,14 +318,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.1.6" - dynamic_color: - dependency: "direct main" - description: - name: dynamic_color - sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d - url: "https://pub.dev" - source: hosted - version: "1.7.0" email_validator: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b098dda9..b5c8f3fe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -85,7 +85,6 @@ dependencies: app_links: ^6.3.2 base32: ^2.1.3 collection: ^1.18.0 - dynamic_color: ^1.6.8 flutter_native_splash: ^2.4.2 font_awesome_flutter: ^10.6.0 google_fonts: ^6.2.1 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 648ddf0a..79dd659a 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,7 +7,6 @@ #include "generated_plugin_registrant.h" #include -#include #include #include #include @@ -15,8 +14,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { AppLinksPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("AppLinksPluginCApi")); - DynamicColorPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); FileSelectorWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSelectorWindows")); SharePlusWindowsPluginCApiRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index eea56857..58083c29 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,7 +4,6 @@ list(APPEND FLUTTER_PLUGIN_LIST app_links - dynamic_color file_selector_windows share_plus url_launcher_windows