force relay when id is suffixed with "/r"

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-02-13 16:40:24 +08:00
parent 759c1901a5
commit 6f106251f9
15 changed files with 127 additions and 63 deletions

View File

@@ -34,11 +34,13 @@ class RemotePage extends StatefulWidget {
required this.id,
required this.menubarState,
this.switchUuid,
this.forceRelay,
}) : super(key: key);
final String id;
final MenubarState menubarState;
final String? switchUuid;
final bool? forceRelay;
final SimpleWrapper<State<RemotePage>?> _lastState = SimpleWrapper(null);
FFI get ffi => (_lastState.value! as _RemotePageState)._ffi;
@@ -107,6 +109,7 @@ class _RemotePageState extends State<RemotePage>
_ffi.start(
widget.id,
switchUuid: widget.switchUuid,
forceRelay: widget.forceRelay,
);
WidgetsBinding.instance.addPostFrameCallback((_) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);