toggle method

void toggle({
  1. BuildContext? context,
})

Implementation

void toggle({BuildContext? context}) {
  if (isOpen) {
    close(context ?? this.context);
  } else {
    open(context ?? this.context);
  }
}