Fat*_*sny 5 flutter flutter-layout
我需要将时间选择器实现为小部件。我不需要它在 modal 或 dialog 。我需要将其显示在容器中。感谢任何资源或指南。
您可以使用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) {},
),
),
],
),
),
),
),
);
Run Code Online (Sandbox Code Playgroud)
结果:
| 归档时间: |
|
| 查看次数: |
3259 次 |
| 最近记录: |