Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter how to show Time Picker as widget

I need to implement time picker as a widget . I don't need it in modal or dialogue . I need it to be shown in container .any resources or guidlines are appreciated.enter image description here

like image 779
Fatima Hossny Avatar asked Jul 25 '19 12:07

Fatima Hossny


1 Answers

You can get something similar using a CupertinoTimePicker.

return Scaffold(
      body: Center(
        child: Container(
          height: 200,
          child: Card(
            elevation: 4,
            child: Row(
              children: <Widget>[
                SizedBox(
                  width: 100,
                  child: Text("Select a time"),
                ),
                Expanded(
                  child: CupertinoTimerPicker(
                    mode: CupertinoTimerPickerMode.hm,
                    onTimerDurationChanged: (data) {},
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );

result:

enter image description here

like image 115
Sergio Bernal Avatar answered Oct 19 '22 01:10

Sergio Bernal