Skip to content

Commit

Permalink
Improved bottom sheet closing behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-SD committed Nov 21, 2024
1 parent e855f2e commit f156d50
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ class CardBottomSheetScreen extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(title: const Text('Adyen card component bottom sheet')),
appBar: AppBar(title: const Text('Card component bottom sheet')),
body: SafeArea(
child: Center(
child: TextButton(
child: Text("Show bottom sheet"),
child: const Text("Show bottom sheet"),
onPressed: () {
showModalBottomSheet(
isDismissible: false,
isScrollControlled: true,
context: context,
builder: (BuildContext context) {
Expand Down Expand Up @@ -72,7 +73,7 @@ class CardBottomSheetScreen extends StatelessWidget {
Align(
alignment: Alignment.centerRight,
child: IconButton(
onPressed: () {},
onPressed: () => Navigator.pop(context),
icon: const Icon(Icons.close),
),
),
Expand All @@ -86,7 +87,7 @@ class CardBottomSheetScreen extends StatelessWidget {
paymentResult, context);
},
),
Text("Example text")
const Text("Example text")
],
),
);
Expand Down

0 comments on commit f156d50

Please sign in to comment.