OmniDateTimePicker icon indicating copy to clipboard operation
OmniDateTimePicker copied to clipboard

option to use this as a widget instead of a dialog

Open aytunch opened this issue 1 year ago • 2 comments

I want to use this view inside of my page. I don't want it to open a new dialog and worry about keyboard show/hides and page push/pops. Is this something possible? thanks? I don't see much examples of this in pub dev.

aytunch avatar Aug 01 '23 15:08 aytunch

Currently it's designed as a dialog, if you want to use it as a widget there are design modifications to be made. Do you have anything in mind how it should look like when using as a widget? There are a few questions I got in mind when doing it: Should the 'Cancel' & 'Ok' button exist? Should picker be inside the box with colored background or just as a column? How do you want the picked datetime result value to be passed back?

@aytunch Welcome to discuss a solution to this.

alanchan-dev avatar Aug 10 '23 03:08 alanchan-dev

If I may chime in, since there hasn't been much discussion since august

  • I think 'Cancel' and 'Ok' should not be there. Instead, there should be an onChange callback which gets passed a DateTime or a tuple/list of DateTimes. When using it as a widget, we will have to manually manage the state, the cancel behavior, etc... This also answers the question re: the datetime result value.
  • It should be as 'minimal' as possible, to reduce the styling options we need. So I'd vote just a column.

livtanong avatar Oct 18 '23 03:10 livtanong

Added OmniDateTimePicker as a widget in v2.0.0

alanchan-dev avatar Jun 14 '24 07:06 alanchan-dev