Closed pishguy closed 5 years ago
With the controller:
BottomBarController controller = BottomBarController(...);
BottomExpandableAppBar(
controller: controller,
);
controller.close(); // Close sheet
controller.swap(); // Open sheet if closed before and closes it if it was opened
Probably, also possible with the default controller:
BottomBarController.of(context).close();
The documentation is a little bit lacking, but the code is clean and simple. You can see all possible methods there: Controller
//close the panel
void close() {
_animationController.fling(velocity: -1.0);
}
void swap() {
if (_animationController.value == 1)
close();
else if (_animationController.value == 0) open();
}
//open the panel
void open() {
_animationController.fling(velocity: 1.0);
}
how can i close programical