stryder-dev / flutter_platform_widgets

Target the specific design of Material for Android and Cupertino for iOS widgets through a common set of Platform aware widgets
MIT License
1.57k stars 171 forks source link

`CupertinoElevatedButtonData` should allow to set the `primaryContrastingColor` #462

Open martin-braun opened 3 months ago

martin-braun commented 3 months ago

CupertinoElevatedButtonData.color is useful to change the background of a PlatformElevatedButton on Cupertino when cupertino.originalStyle: false. However when trying to change the foreground, nothing can be done.

CupertinoElevatedButtonData should allow to set the primaryContrastingColor that would get passed in here:

https://github.com/stryder-dev/flutter_platform_widgets/blob/216d5e245854e9c852ca3416b36ca9de0d9e92b4/lib/src/platform_elevated_button.dart#L194

We might just call it contrastingColor. The only way to bypass this issue right now is to either wrap PlatformElevatedButton into your own CupertinoTheme or modify the colors of the children directly.