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.
samples/cupertino_gallery/lib/widgets/popup_surface_page.dart

37 lines
1010 B

import 'package:flutter/cupertino.dart';
class PopupSurfacePage extends StatelessWidget {
const PopupSurfacePage({super.key});
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(
middle: Text('Popup Surface'),
),
child: Center(
child: CupertinoButton(
child: const Text('Show Popup Surface'),
onPressed: () {
showCupertinoModalPopup<void>(
context: context,
builder: (BuildContext context) {
return CupertinoPopupSurface(
child: Container(
color: CupertinoColors.white,
width: 200,
height: 200,
child: const Center(
child: Text('This is a popup surface.'),
),
),
);
},
);
},
),
),
);
}
}