switch window, close subwindow

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2022-08-09 09:01:06 +08:00
parent 927991c9de
commit 28b75fa9f7
6 changed files with 29 additions and 3 deletions

View file

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/instance_manager.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:window_manager/window_manager.dart';
import 'models/model.dart';
import 'models/platform_model.dart';
@ -109,6 +110,12 @@ backToHome() {
Navigator.popUntil(globalKey.currentContext!, ModalRoute.withName("/"));
}
void window_on_top() {
windowManager.restore();
windowManager.show();
windowManager.focus();
}
typedef DialogBuilder = CustomAlertDialog Function(
StateSetter setState, void Function([dynamic]) close);