material-components / material-components-flutter-codelabs

Codelabs for Material Components for Flutter
212 stars 244 forks source link

Issues Identified in MDC-103 Flutter: Material Theming with Color, Shape, Elevation, and Type #297

Open laurencetroyv opened 6 months ago

laurencetroyv commented 6 months ago

Issues Identified and Resolutions:

1. Use the new text themes

2. Shrink the text

3. Theme the text fields

smissaertj commented 2 months ago

Regarding the first item you mentioned, they are referring to the error attribute:

ThemeData _buildShrineTheme() {
  final ThemeData base = ThemeData.light(useMaterial3: true);
  return base.copyWith(
      colorScheme: base.colorScheme.copyWith(
        primary: kShrinePink100,
        onPrimary: kShrineBrown900,
        secondary: kShrineBrown900,
        error: kShrineErrorRed,
      ),
      textTheme: _buildShrineTextTheme(base.textTheme),
      textSelectionTheme: const TextSelectionThemeData(
        selectionColor: kShrinePink100,
      ));
}