Skip to content

Commit

Permalink
fix(flutterfire_ui): Fix Flutter Cupertino button color bug. (#8315)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatadel committed Mar 22, 2022
1 parent 9a042e5 commit 47dc6d0
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,19 @@ class LoadingButton extends StatelessWidget {
);
}

return CupertinoTheme(
data: CupertinoTheme.of(context).copyWith(
primaryColor: color ?? CupertinoColors.activeBlue,
),
child: CupertinoButton.filled(
onPressed: onTap,
child: child,
),
final button = CupertinoButton.filled(
onPressed: onTap,
child: child,
);

return color != null
? CupertinoTheme(
data: CupertinoTheme.of(context).copyWith(
primaryColor: color,
),
child: button,
)
: button;
}

if (icon != null) {
Expand Down

0 comments on commit 47dc6d0

Please sign in to comment.