deriveTheme method

ThemeData deriveTheme(
  1. String? fromValue, {
  2. String googleFont = font,
})

Derive theme from a color value and a https://fonts.google.com/ font

Implementation

ThemeData deriveTheme(String? fromValue, {String googleFont = font}) {
  Color? col = ColorObservable.toColor(fromValue);
  Brightness? b = getBrightness();

  return ThemeData(
      colorSchemeSeed: col ?? Colors.blueGrey,
      brightness: b,
      fontFamily: font,
      // pageTransitionsTheme: PageTransitionsTheme(builders: {
      //   TargetPlatform.android: CustomTransitionBuilder('android'),
      //   TargetPlatform.iOS: CustomTransitionBuilder('ios'),
      //   TargetPlatform.macOS: CustomTransitionBuilder('macos'),
      //   TargetPlatform.windows: CustomTransitionBuilder('windows'),
      //   TargetPlatform.linux: CustomTransitionBuilder('linux'),
      // }),
      useMaterial3: true);
}