我想更改showModalBottomSheet所处的状态。特别是在true / false之间更改enableDrag和isDismissible,而不显示新的模式或替换已经呈现的模式。目前有可能吗?
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),
)