I’m using a showBottomSheet (Not modal sheet), and the content I’m displaying doesn’t go over the appbar, and I’m not sure why because I remember doing that in the past.
Here’s my code:
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Testing'),
),
body: TextButton(
onPressed: () => {
showBottomSheet(
enableDrag: true,
context: context,
builder: (context) => Container(
color: Colors.red,
),
)
},
child: const Text('Press'),
),
);
}
Result:
I don’t want to resort to show my AppBar with a Visibility tag, because then I’d have to do it for every screen! So I’m looking for a cleaner solution.
Any insights?
Thanks!
2
Answers
I found a solution by using a
showModalBottomSheet
instead.use (isScrollControlled: true) parameter in bottom sheet