remove overlay of PortForward page because it will cause rebuilding when closing

msgbox

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2022-09-05 16:28:49 +08:00
parent 48481884b1
commit 31550452c3

View File

@ -70,9 +70,6 @@ class _PortForwardPageState extends State<PortForwardPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return Overlay(initialEntries: [
OverlayEntry(builder: (context) {
_ffi.dialogManager.setOverlayState(Overlay.of(context));
return Scaffold( return Scaffold(
backgroundColor: MyTheme.color(context).grayBg, backgroundColor: MyTheme.color(context).grayBg,
body: FutureBuilder(future: () async { body: FutureBuilder(future: () async {
@ -93,11 +90,9 @@ class _PortForwardPageState extends State<PortForwardPage>
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: MyTheme.color(context).bg, color: MyTheme.color(context).bg,
border: border: Border.all(width: 1, color: MyTheme.border)),
Border.all(width: 1, color: MyTheme.border)), child:
child: widget.isRDP widget.isRDP ? buildRdp(context) : buildTunnel(context),
? buildRdp(context)
: buildTunnel(context),
), ),
), ),
], ],
@ -107,8 +102,6 @@ class _PortForwardPageState extends State<PortForwardPage>
return const Offstage(); return const Offstage();
}), }),
); );
})
]);
} }
buildPrompt(BuildContext context) { buildPrompt(BuildContext context) {