mytooyo / board_datetime_picker

Picker to select date and time for Flutter. It is both a calendar and a picker, offering a variety of options as a package.
BSD 3-Clause "New" or "Revised" License
14 stars 12 forks source link

UI enhancements #14

Closed matteoberla closed 1 year ago

matteoberla commented 1 year ago

Hi, i would like to show you some enhancements about the UI, let me know what you think and if my ideas are valid. duration picker

-Title: Maybe a description of the picker to show what the user is doing could be useful in many situations. -Adding the possibility of hiding the rectangle that usually contains "Today" "Tomorrow" as in many situations it's empty and it seems wrong. -Move the confirm button and make it bigger: maybe in the top right corner as it is now but outside the rectangle -Adding a custom (or fixed texts so they'll need to be translated) on the top of the picker to show if it's the day, month, year, hour, minute picker (Don't know if it's useful but i would use it).

Thank you.

mytooyo commented 1 year ago

@matteoberla Thanks for the idea! It might be useful to have a flexible customizable feature that provides only the picker portion. Indeed, I think that the UI needs to be improved, since the upper frame is no longer needed for time only. Consider allowing the title and item name to be specified.

Is there a case where the "Today" or "Tomorrow" button is unnecessary even for a date/time picker? I always display them for date/time pickers, but if they are not necessary in some cases, I need to consider hiding them.

matteoberla commented 1 year ago

when the time picker (pickerType.time) is shown there's only the empty white rectangle, also when minDate and maxDate are set and between them there's not today or tomorrow it has the same behaviour.

Thank you.

mytooyo commented 1 year ago

@matteoberla How about this kind of UI?

matteoberla commented 1 year ago

This seems to be much more clear. Is the picker text customizable or fixed? If fixed thse are the italian translations: Year - Anno Month - Mese Day- Giorno Hour - Ora Minute- Minuto

mytooyo commented 1 year ago

It is implemented so that both title and subtitle can be specified.
If there is not enough to display, the default English will be used to compensate.
If all are unspecified, they will be displayed without subtitles as before.

class BoardDateTimeItemTitles {
  final String? year;
  final String? month;
  final String? day;
  final String? hour;
  final String? minute;

}
matteoberla commented 1 year ago

That's clear, thank you very much, you're doing an amazing job.