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.
-
check this repo github.com/wuzhendev/flutter-cupertino-date-picker– Saed NabilJul 25, 2019 at 13:14
-
I also had the problem and solved it with the package numberpicker: pub.dev/packages/numberpicker– Markus HeinJul 25, 2019 at 13:30
Add a comment
|
1 Answer
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:
-
import for retrieving CupertinoTimerPicker is import 'package:flutter/cupertino.dart';– gsmFeb 25, 2021 at 10:34