FSThemeData.material3 constructor

FSThemeData.material3({
  1. required Color seedColor,
  2. Brightness brightness = Brightness.light,
})

Create a Material 3 compliant theme

Implementation

factory FSThemeData.material3({
  required Color seedColor,
  Brightness brightness = Brightness.light,
}) {
  final colors = FSColorScheme.material3(
    seedColor: seedColor,
    brightness: brightness,
  );

  final baseTextStyle = TextStyle(
    color: colors.onBackground,
  );

  return FSThemeData._internal(
    colors: colors,
    typography: FSTypography.fromBaseTextStyle(baseTextStyle),
    spacing: const FSSpacing(),
    animation: FSAnimation(
      // ✅ FIXED: Provide required duration parameter
      duration: FSAnimationPreset.standard,
      curve: FSAnimationPreset.ease,
    ),
    breakpoints: const FSCustomBreakpoints(),
    brightness: brightness,
  );
}