Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
laurencetroyv opened this issue Feb 24, 2024 · 1 comment

Comments

@laurencetroyv
Copy link

Issues Identified and Resolutions:

1. Use the new text themes

  • Issue: In Step 5 under "Use the new text themes," the instruction mentions adding themes to _buildShrineTheme after an error, but there is no error present.
  • Resolution: Update the instruction to remove the reference to an error since none exists.

2. Shrink the text

  • Issue: The code in Step 5 uses a deprecated text style: style: theme.textTheme.button. This generates a warning stating that 'button' is deprecated and should be replaced with 'labelLarge'.
  • Resolution: Update the code to replace textTheme.button with textTheme.labelLarge to avoid the deprecated warning.

3. Theme the text fields

  • Issue: In the images shown for the login page under "Theme the text fields," there is spacing present that was not explicitly instructed in earlier tutorials (1-3), causing confusion for beginners.
  • Resolution: Clarify or provide instructions on the source code regarding the spacing to ensure consistency and prevent confusion for beginners.
@smissaertj
Copy link

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,
      ));
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants