Skip to content

[syncfusion_flutter_datepicker] Enable customization on "_getActionsButton" #1937

@omi-ramdelatina

Description

@omi-ramdelatina

Use case

As a developer I want to have a fully customizable action buttons "Cancel" & "OK".
Current implementation only relies on below code block, in which a bit limiting.
Lastly, "Action buttons" alignment parameter should also be available.

// date_picker.dart lines 7055-7060
Color textColor =
    widget.todayHighlightColor ?? _datePickerTheme.todayHighlightColor!;
if (textColor == Colors.transparent) {
  final TextStyle style = _datePickerTheme.todayTextStyle!;
  textColor = style.color != null ? style.color! : Colors.blue;
}

Proposal

I don't know how to properly implement this but maybe create a dedicated class for action button styling?

class DateRangePickerActionButtonStyle {
  // alignment
  // confirmButtonStyle
  // confirmTextStyle
  // cancelButtonStyle
  // cancelTextStyle
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    date range pickerDate range picker componentsolvedSolved the query using existing solutionsworkaround availableWorkaround available to overcome the query

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions