flutterdartdatetimepickertimepickerflutter-alertdialog

How to create an Alert Dialogue with selecting values of no. of days, hours and minutes in flutter?


I am new to flutter, I knew very basic about flutter. I am trying to set a timer in my app, I want user to select number of days, hours and minutes. And it should be of a maximum 6 days 23 hours 59 minutes.

I tried many things, such as time picker, CupertinoTimePicker, CupertinoDatePicker. But they didn't able to give my desired output. This is what I want to display in app

I don't even know what I should call that thing, I tried dropdownbox in alertdialog, but It increasing the size of alert box according to the size of dropdown list, for 7 days it's ok, but for 24 hours, 60 minutes? It's became very huge alert covering screen space.

I want to create like above one. Can you please help me.


Solution

  • This is a simple layout with 3 numberpickers. Put them in a Row and you have your desired layout.

    There is btw. already a package for a numberpicker, so you don't have to create it on your own: https://pub.dev/packages/numberpicker