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

@@ -8,7 +8,9 @@ import 'package:flutter/material.dart' hide TabBarTheme;
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/main.dart';
import 'package:flutter_hbb/common/shared_state.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_hbb/models/state_model.dart';
import 'package:get/get.dart';
import 'package:get/get_rx/src/rx_workers/utils/debouncer.dart';
import 'package:scroll_pos/scroll_pos.dart';
@@ -179,7 +181,6 @@ typedef LabelGetter = Rx<String> Function(String key);
int _lastClickTime = DateTime.now().millisecondsSinceEpoch;
class DesktopTab extends StatelessWidget {
final bool showTabBar;
final bool showLogo;
final bool showTitle;
final bool showMinimize;
@@ -206,7 +207,6 @@ class DesktopTab extends StatelessWidget {
DesktopTab({
Key? key,
required this.controller,
this.showTabBar = true,
this.showLogo = true,
this.showTitle = true,
this.showMinimize = true,
@@ -229,8 +229,8 @@ class DesktopTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(children: [
Offstage(
offstage: !showTabBar,
Obx(() => Offstage(
offstage: !stateGlobal.showTabBar.isTrue,
child: SizedBox(
height: _kTabBarHeight,
child: Column(
@@ -245,7 +245,7 @@ class DesktopTab extends StatelessWidget {
),
],
),
)),
))),
Expanded(
child: pageViewBuilder != null
? pageViewBuilder!(_buildPageView())