mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
660 B
29 lines
660 B
import 'package:flutter/cupertino.dart';
|
|
|
|
class PickerPage extends StatelessWidget {
|
|
const PickerPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CupertinoPageScaffold(
|
|
navigationBar: const CupertinoNavigationBar(
|
|
middle: Text('Picker'),
|
|
),
|
|
child: Center(
|
|
child: SizedBox(
|
|
height: 200,
|
|
child: CupertinoPicker(
|
|
itemExtent: 32,
|
|
onSelectedItemChanged: (int index) {},
|
|
children: const <Widget>[
|
|
Text('One'),
|
|
Text('Two'),
|
|
Text('Three'),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|