elbeicktalat / flutter_auth_buttons

Auth Buttons is a flutter widget library, include buttons for authenticating with the most popular social networks.
https://pub.dev/packages/auth_buttons
BSD 3-Clause "New" or "Revised" License
32 stars 32 forks source link

iconColor attribute not working on GoogleAuthButton in AuthButtonStyle.secondary #42

Closed S0NN1 closed 2 years ago

S0NN1 commented 2 years ago

Hi, I was tweaking the GoogleAuthButton and I found an incorrect behavior: The following code works as expected

GoogleAuthButton(
          darkMode: true,
          onPressed: () async {
            // do something
          },
          style: AuthButtonStyle(
                      padding: EdgeInsets.fromLTRB(0, 0, 25, 0),
                      separator: 11,
                      buttonColor: Theme.of(context).cardColor,
                      iconColor: Colors.white,
                      iconBackground: Theme.of(context).cardColor,
                      buttonType: AuthButtonType.icon,
                      borderColor: Theme.of(context).colorScheme.secondary,
                      elevation: 0,
                      textStyle: TextStyle(color: Colors.white)),
        ),

image Meanwhile if I select the AuthButtonStyle.secondary attribute instead, the iconColor specified is ignored

GoogleAuthButton(
          darkMode: true,
          onPressed: () async {
            // do something
          },
          style: AuthButtonStyle(
                      padding: EdgeInsets.fromLTRB(0, 0, 25, 0),
                      separator: 11,
                      buttonColor: Theme.of(context).cardColor,
                      iconColor: Colors.white,
                      iconBackground: Theme.of(context).cardColor,
                      buttonType: AuthButtonType.secondary,
                      borderColor: Theme.of(context).colorScheme.secondary,
                      elevation: 0,
                      textStyle: TextStyle(color: Colors.white)),
        ),

image The other buttons work as expected image Shouldn't it be customizable?

S0NN1 commented 2 years ago

I forgot to mention that I'm using the latest version: auth_buttons 2.0.4 with flutter 2.8.1

elbeicktalat commented 2 years ago

Hi @S0NN1, Thanks for your issue.

Of course this should be customizable as much as possible, clearly this is a bug which I will fix it as much as possible.

elbeicktalat commented 2 years ago

Hi @S0NN1

I have fixed this, NOTE: Only secondary icons cannot be changed of color.

Thanks agin for you help.