i want to show showModalBottomSheet
above bottomNavigationBar
natively without Stack
or any other custom widget
currently this is my code
body: Navigator(
onGenerateRoute: (settings) {
return MaterialPageRoute(
builder: (context) {
return ListView(
children: [
TextButton(
onPressed: () {
showModalBottomSheet( <-- Triggered from this inside `Navigator`
useRootNavigator: false,
context: context,
builder: (_) => const SizedBox(
height: 200,
child: Text(
'Modal bottom sheet',
style: TextStyle(fontSize: 30),
),
),
);
},
child: CustomText().darkGrey(
txt: 'Add to wishlist',
size: 17,
),
),
const DetailProductStoreName(),
],
);
},
);
},
),
bottomNavigationBar: AddToCartBottomNav(), <--what i expect is triggered within 'bottomNavigationBar'
left pict when triggered within body
-> Navigator
-> MaterialPageRoute
right pict when triggered within bottomNavigationBar
what i expect is showModalBottomSheet
triggered from bottomNavigationBar
and modalSheet can show above Add to Cart
button just like on left pict
2
Answers
It’s work for me
In this code:
ListTile widgets.
"Show Bottom Sheet" list tile.
bottom of the screen.
doesn’t overlap with it.
OutPut 1
OutPut 2