Closed david-legend closed 5 months ago
middle
defaults to: CupertinoTheme.of(context).textTheme.navTitleTextStyle.color!
save
defaults to the default color of CupertinoButton
. This should be themeData.primaryColor
cancel
is hardcoded to CupertinoColors.destructiveRed
, unfortunately. We could think about being more open here
For middle
we should use the full style of navTitleTextStyle
and not only the color
For cancel
we could add a style to the CupertinoOptions
class
Beside the color of the cancel button, all three buttons should be able to style by overriding the theme. If you only want to change the style for the modal, you can use the builder function in the options for that
Hello @david-legend, @torbenkeller,
Based on your inputs the package now provides the possibility to specify styling options for the 3 texts through the style property of the CupertinoDatePickerOptions.
@immutable
class CupertinoDatePickerOptionsStyle {
const CupertinoDatePickerOptionsStyle({
this.saveButton,
this.cancelButton = kDefaultCancelStyle,
this.modalTitle,
});
final TextStyle? saveButton;
final TextStyle cancelButton;
final TextStyle? modalTitle;
}
I have been trying to style the save button on the picker. There's no styling exposed in the API and I can't see to find which theme color affecting it