Widget _buildContent() { return(new Flexible( child: new Container( color: CColors.Background, child: new ListView( physics: new AlwaysScrollableScrollPhysics(), children: new List <Widget> { this.widget.viewModel.hasReviewUrl || this.widget.viewModel.anonymous ? _buildGapView() : new Container(), this.widget.viewModel.hasReviewUrl ? _buildCellView("评分", () => { AnalyticsManager.ClickSetGrade(); this.widget.actionModel.openUrl(obj: this.widget.viewModel.reviewUrl); }) : new Container(), this.widget.viewModel.anonymous ? _buildCellView("绑定 Unity ID", () => this.widget.actionModel.mainRouterPushTo(MainNavigatorRoutes.BindUnity)) : new Container(), _buildGapView(), _buildCellView("检查更新", () => { AnalyticsManager.ClickCheckUpdate(); VersionManager.checkForUpdates(CheckVersionType.setting); }), _buildGapView(), _buildCellView("清理缓存", () => { AnalyticsManager.ClickClearCache(); CustomDialogUtils.showCustomDialog( child: new CustomLoadingDialog( message: "正在清理缓存" ) ); this.widget.actionModel.clearCache(); Window.instance.run(TimeSpan.FromSeconds(1), () => { CustomDialogUtils.hiddenCustomDialog(); CustomDialogUtils.showToast("缓存已清除", Icons.check_circle_outline); } ); }), _buildGapView(), _switchRow( CCommonUtils.isIPhone ? "帧率监测" : "帧率监测 (暂仅支持 TinyGame)", value: this.fpsLabelIsOpen, value => { LocalDataManager.setFPSLabelStatus(isOpen: value); this.fpsLabelIsOpen = value; this.setState(() => {}); FPSLabelPlugin.SwitchFPSLabelShowStatus(isOpen: value); } ), this.widget.viewModel.isLoggedIn ? _buildGapView() : new Container(), this.widget.viewModel.isLoggedIn ? this._buildLogoutBtn() : new Container() } ) ) )); }
Widget _buildContent() { return(new Flexible( child: new Container( decoration: new BoxDecoration( CColors.BgGrey ), child: new ListView( physics: new AlwaysScrollableScrollPhysics(), children: new List <Widget> { _buildGapView(), this.widget.viewModel.hasReviewUrl ? _buildCellView("评分", () => { AnalyticsManager.ClickSetGrade(); this.widget.actionModel.openUrl(this.widget.viewModel.reviewUrl); }) : new Container(), this.widget.viewModel.anonymous ? _buildCellView("绑定 Unity ID", () => this.widget.actionModel.mainRouterPushTo(MainNavigatorRoutes.BindUnity)) : new Container(), _buildCellView("意见反馈", () => { this.widget.actionModel.mainRouterPushTo(MainNavigatorRoutes.Feedback); }), _buildCellView("关于我们", () => { AnalyticsManager.ClickEnterAboutUs(); this.widget.actionModel.mainRouterPushTo(MainNavigatorRoutes.AboutUs); }), _buildGapView(), _buildCellView("检查更新", () => { AnalyticsManager.ClickCheckUpdate(); VersionManager.checkForUpdates(CheckVersionType.setting); }), _buildGapView(), _buildCellView("清理缓存", () => { AnalyticsManager.ClickClearCache(); CustomDialogUtils.showCustomDialog( child: new CustomLoadingDialog( message: "正在清理缓存" ) ); this.widget.actionModel.clearCache(); Window.instance.run(TimeSpan.FromSeconds(1), () => { CustomDialogUtils.hiddenCustomDialog(); CustomDialogUtils.showToast("缓存已清除", Icons.check_circle_outline); } ); }), this.widget.viewModel.isLoggedIn ? _buildGapView() : new Container(), this.widget.viewModel.isLoggedIn ? this._buildLogoutBtn() : new Container() } ) ) )); }