https://flutter.dev/docs/development/ui/widgets/cupertino
showCupertinoModalPopup(
context: context,
builder: (BuildContext context) => CupertinoActionSheet(
title: const Text('Choose Options'),
message: const Text('Your options are '),
actions: <Widget>[
CupertinoActionSheetAction(
child: const Text('One'),
onPressed: () {
Navigator.pop(context, 'One');
},
),
CupertinoActionSheetAction(
child: const Text('Two'),
onPressed: () {
Navigator.pop(context, 'Two');
},
)
],
cancelButton: CupertinoActionSheetAction(
child: const Text('Cancel'),
isDefaultAction: true,
onPressed: () {
Navigator.pop(context, 'Cancel');
},
)),
);
특이한 것은 안드로이드에서 cupertino 디자인이 유지된다는 점이다.
ㅋ 재밌네
'프로그래밍 > Flutter' 카테고리의 다른 글
Flutter SNS Login Package (0) | 2020.08.24 |
---|---|
Shared Preferences (1) | 2020.04.28 |
image shake animation (0) | 2020.04.04 |
flutter_staggered_grid_view (0) | 2020.03.15 |
Flutter Search-bar 구현 (0) | 2020.03.13 |