Select dates by picking colors
This package can:
- Display a color picker that outputs dates
- That's it
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.
- 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
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.