flutter_desktop: remote rxbool of fullscreen

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-11-01 17:01:43 +08:00
parent 5df850e7de
commit b28fa19dfe
12 changed files with 128 additions and 141 deletions

View File

@@ -28,15 +28,9 @@ class RemotePage extends StatefulWidget {
const RemotePage({
Key? key,
required this.id,
required this.windowId,
required this.tabBarHeight,
required this.windowBorderWidth,
}) : super(key: key);
final String id;
final int windowId;
final double tabBarHeight;
final double windowBorderWidth;
@override
State<RemotePage> createState() => _RemotePageState();
@@ -58,11 +52,6 @@ class _RemotePageState extends State<RemotePage>
late FFI _ffi;
void _updateTabBarHeight() {
_ffi.canvasModel.tabBarHeight = widget.tabBarHeight;
_ffi.canvasModel.windowBorderWidth = widget.windowBorderWidth;
}
void _initStates(String id) {
PrivacyModeState.init(id);
BlockInputState.init(id);
@@ -91,7 +80,6 @@ class _RemotePageState extends State<RemotePage>
_ffi = FFI();
_updateTabBarHeight();
Get.put(_ffi, tag: widget.id);
_ffi.start(widget.id);
WidgetsBinding.instance.addPostFrameCallback((_) {
@@ -164,7 +152,6 @@ class _RemotePageState extends State<RemotePage>
@override
Widget build(BuildContext context) {
super.build(context);
_updateTabBarHeight();
return WillPopScope(
onWillPop: () async {
clientClose(_ffi.dialogManager);
@@ -241,7 +228,6 @@ class _RemotePageState extends State<RemotePage>
paints.add(QualityMonitor(_ffi.qualityMonitorModel));
paints.add(RemoteMenubar(
id: widget.id,
windowId: widget.windowId,
ffi: _ffi,
onEnterOrLeaveImageSetter: (func) => _onEnterOrLeaveImage4Menubar = func,
onEnterOrLeaveImageCleaner: () => _onEnterOrLeaveImage4Menubar = null,