-
Notifications
You must be signed in to change notification settings - Fork 904
Closed
Labels
date range pickerDate range picker componentDate range picker componentfeatureNew featureNew featureuncertainUncertain featureUncertain feature
Description
Use case
Currently, we can only set cancel and okay buttons and customize the text of these buttons. Additionally, we can use the theme to set the decoration of the buttons. However, it would be great if we could use any widget as the footer.
Furthermore, it would be beneficial if we could change the decoration of each button separately, as the cancel and okay buttons often require distinct designs.
Proposed Features:
- Allow any widget to be used as the footer.
- Enable separate decoration customizations for the cancel and okay buttons.
Benefits:
- Enhanced flexibility for developers to customize the footer according to their application needs.
- Improved design capabilities by allowing distinct styles for different buttons.
Proposal
SfDateRangePicker(
cancelTextStyle: textTheme.bodyMedium
?.copyWith(color: const Color(0xff19181A)),
okTextStyle: textTheme.bodyMedium?.copyWith(
color: Colors.white,
),
cancelStyle: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>(
AppColors.bodyTextDark,
),
padding: WidgetStateProperty.all<EdgeInsetsGeometry>(
const EdgeInsets.symmetric(
vertical: 16.0, horizontal: 16.0)),
shape: WidgetStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4.0),
),
),
),
okStyle: ButtonStyle(
backgroundColor:
WidgetStateProperty.all<Color>(AppColors.primaryGreen700),
padding: WidgetStateProperty.all<EdgeInsetsGeometry>(
const EdgeInsets.symmetric(
vertical: 16.0, horizontal: 16.0)),
shape: WidgetStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4.0),
),
),
),
showCancelAndOkButtonOnly: true,
)Metadata
Metadata
Assignees
Labels
date range pickerDate range picker componentDate range picker componentfeatureNew featureNew featureuncertainUncertain featureUncertain feature
