shouldPopOn method
Controls how sheet should react on pop events.
Implementation
@override
bool shouldPopOn(MultiStateSheetController<ThreeStateSheet> controller) {
switch (controller.closestState) {
case ThreeStateSheet.hidden:
controller.reset();
return true;
case ThreeStateSheet.open:
controller.setState(ThreeStateSheet.hidden);
return false;
case ThreeStateSheet.expanded:
controller.setState(ThreeStateSheet.open);
return false;
}
}