customizable_datetime_picker 0.0.1
customizable_datetime_picker: ^0.0.1 copied to clipboard
Customizable Datetime Picker for Flutter projects. You can customize different parts of the picker like format locale divider color and many others.
customizable_datetime_picker #
Customizable Datetime Picker for Flutter projects. You can customize different parts of the picker like format locale divider color and many others.
Features #
Use this plugin in your Flutter app to:
- Display Cupertino style DatePicker with customizable parts.
- You need to change even small parts of the pciker, like color and thickness of the dividers. Picker item height and background color.
- You need to select Locale and date format.
Usage #
You can use this widget with deafult parameters just like this:
CustomizableDatePickerWidget()
Or you can use DateTimePickerTheme and DatePickerDividerTheme to define design of the picker. And provide needed parameters to customize logic of the picker (datetime format, range of dates and so on):
CustomizableDatePickerWidget(
locale: DateTimePickerLocale.jp,
looping: true,
initialDate: _dateTime,
dateFormat: "dd-MMMM-yyyy",
pickerTheme: const DateTimePickerTheme(
itemTextStyle: TextStyle(
color: Color(0xFF101010),
fontSize: 20,
fontWeight: FontWeight.w600
),
backgroundColor: Color(0xFFEBEBEB),
itemHeight: 80,
pickerHeight: 300,
dividerTheme: DatePickerDividerTheme(
dividerColor: Color(0xFF00A962),
thickness: 3,
height: 2
)
),
onChange: (dateTime, selectedIndex) => _dateTime = dateTime
)
More details in example.