You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
419 B
23 lines
419 B
import 'package:get/get.dart';
|
|
|
|
/// 全局 Overlay 控制器
|
|
class OverlayController extends GetxController {
|
|
/// overlay 是否显示
|
|
final showOverlay = false.obs;
|
|
|
|
/// 显示 overlay
|
|
void show() {
|
|
showOverlay.value = true;
|
|
}
|
|
|
|
/// 隐藏 overlay
|
|
void hide() {
|
|
showOverlay.value = false;
|
|
}
|
|
|
|
/// 切换 overlay 显示状态
|
|
void toggle() {
|
|
showOverlay.value = !showOverlay.value;
|
|
}
|
|
}
|
|
|