awesome_datepicker 0.1.1 awesome_datepicker: ^0.1.1 copied to clipboard
A sleek widget that lets your users input dates using a color picker!
awesome_datepicker
#
Select dates by picking colors
Features #
This package can:
- Display a color picker that outputs dates
- That's it
Usage #
You can use the async function showAwesomeDatePicker
to trigger the picker dialog:
var selectedDate = DateTime.now();
await showAwesomeDatePicker(
context: context,
mode: AwesomeDatePickerMode.hex,
useAlpha: true,
initialDate: DateTime.now(),
onChanged: (date) {
if (kDebugMode) print('changed to $date');
selectedDate = date;
},
);
Alternatively, you can directly use the AwesomeDatePicker
widget in your form or dialog:
// ...
child: AwesomeDatePicker(
initialDate: DateTime.now(),
mode: AwesomeDatePickerMode.hex,
colorPickerHeight: 250,
hueRingStrokeWidth: 20,
onDateChanged: (date) {
if (kDebugMode) print('changed to $date');
selectedDate = date;
},
),
// ...
For a more detailed example, explore the sample app. To test the limits of customization, check dialog.dart.
Additional Information #
- This is bad UI. It's not intended for use.
- There's a lot of stuff that can be added. I've left some TODOs for myself. I may or may not come around to them at an unknown time in the future.
- You can report bugs... but I ain't resolvin' none of 'em
License #
Copyright (C) 2023 Aditya Rajput & other contributors
This software is licensed under the Affero GPL v3. You should have received a copy of the Affero GPL v3 along with this program. If not, you can visit the original here.