Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

MDC-103: Tutorial needs to be updated to reflect fix for button color change #139

Closed
vitorpavanelli opened this issue Dec 13, 2018 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@vitorpavanelli
Copy link

Hi,

I might be wrong, but I think there is the need to update the code shown in the tutorial with the fix applied in the branch.

Please, can someone take a look at it?

Here are the changes I saw:

  1. https://codelabs.developers.google.com/codelabs/mdc-103-flutter/#3
// TODO: Build a Shrine Theme (103)
final ThemeData _kShrineTheme = _buildShrineTheme();

ThemeData _buildShrineTheme() {
  final ThemeData base = ThemeData.light();
  return base.copyWith(
    accentColor: kShrineBrown900,
    primaryColor: kShrinePink100,
    buttonColor: kShrinePink100,
    scaffoldBackgroundColor: kShrineBackgroundWhite,
    cardColor: kShrineBackgroundWhite,
    textSelectionColor: kShrinePink100,
    errorColor: kShrineErrorRed,

   // Needs to be added
   buttonTheme: base.buttonTheme.copyWith(
      buttonColor: kShrinePink100,
    ),

   
  );
}
  1. https://codelabs.developers.google.com/codelabs/mdc-103-flutter/#4
class AccentColorOverride extends StatelessWidget {
  const AccentColorOverride({Key key, this.color, this.child})
      : super(key: key);

  final Color color;
  final Widget child;

  @override
  Widget build(BuildContext context) {
    return Theme(
      child: child,
      data: Theme.of(context).copyWith(
accentColor: color,
        brightness: Brightness.dark          //needs to be added
),
    );
  }
}

Thank you.

@vitorpavanelli vitorpavanelli changed the title Tutorial needs to be updated to reflect fix for button color change MDC-103 Tutorial needs to be updated to reflect fix for button color change Dec 13, 2018
@vitorpavanelli vitorpavanelli changed the title MDC-103 Tutorial needs to be updated to reflect fix for button color change MDC-103: Tutorial needs to be updated to reflect fix for button color change Dec 13, 2018
@willlarche willlarche added the duplicate This issue or pull request already exists label Dec 26, 2018
@willlarche
Copy link
Collaborator

Thank you for reporting! This is a duplicate of #128 which has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants