material_you_dynamic_theme
library
Functions
-
floatToInt8(double x)
→ int
-
Converts a float value to an 8-bit integer.
-
getThemeSettings()
→ Future<ThemeSettingsModel>
-
Fetches settings from SharedPreferences.
-
loadColorScheme({required Color fallbackSeedColor})
→ Future<BrightnessGetColorScheme>
-
Asynchronously loads the color scheme, handling both dynamic and non-dynamic color scenarios.
-
runAppDynamic({GlobalKey<NavigatorState>? navigatorKey, GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey, Widget? home, Map<String, WidgetBuilder> routes = const <String, WidgetBuilder>{}, String? initialRoute, RouteFactory? onGenerateRoute, InitialRouteListFactory? onGenerateInitialRoutes, RouteFactory? onUnknownRoute, NotificationListenerCallback<NavigationNotification>? onNavigationNotification, List<NavigatorObserver> navigatorObservers = const <NavigatorObserver>[], RouteInformationProvider? routeInformationProvider, RouteInformationParser<Object>? routeInformationParser, RouterDelegate<Object>? routerDelegate, BackButtonDispatcher? backButtonDispatcher, RouterConfig<Object>? routerConfig, TransitionBuilder? builder, String title = '', GenerateAppTitle? onGenerateTitle, ThemeData? theme, ThemeData? darkTheme, ThemeData? highContrastTheme, ThemeData? highContrastDarkTheme, ThemeMode? themeMode, Duration themeAnimationDuration = kThemeAnimationDuration, Curve themeAnimationCurve = Curves.linear, Color? color, Locale? locale, Iterable<LocalizationsDelegate>? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')], bool debugShowMaterialGrid = false, bool showPerformanceOverlay = false, bool checkerboardRasterCacheImages = false, bool checkerboardOffscreenLayers = false, bool showSemanticsDebugger = false, bool debugShowCheckedModeBanner = true, Map<ShortcutActivator, Intent>? shortcuts, Map<Type, Action<Intent>>? actions, String? restorationScopeId, ScrollBehavior? scrollBehavior, bool useInheritedMediaQuery = false, AnimationStyle? themeAnimationStyle})
→ Future<void>
-
A helper function to run your app with dynamic theming.
-
saveThemeSettings(ThemeSettingsModel themeSettings)
→ Future<void>
-
Saves settings to SharedPreferences.
-
value({dynamic a, dynamic r, dynamic g, dynamic b})
→ int
-
Converts ARGB values to an integer representation of a color.
Typedefs
-
ConverterFunction<T, R>
= R Function(T value)
-
A type definition for a function that converts a value of type
T to a value of type R.