I would like to change the state my showModalBottomSheet is in. Specifically change enableDrag and isDismissible between true/false without showing a new modal or replacing the one that is already rendered. Is this currently possible at all?
bool allowDismiss = false; // change this variable after render
showModalBottomSheet(
context: context,
isScrollControlled: true,
isDismissible: allowDismiss,
enableDrag: allowDismiss,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.only(topLeft: Radius.circular(30), topRight: Radius.circular(30)),
),
builder: (context) => Container(height: 400),
)