Пример #1
0
 Widget _buildBottomView()
 {
     return(new Container(
                child: new Column(
                    children: new List <Widget> {
         new CustomListTile(
             new Icon(icon: Icons.outline_settings, size: 24, color: CColors.TextBody2),
             "设置",
             trailing: CustomListTileConstant.defaultTrailing,
             onTap: () => this.widget.actionModel.mainRouterPushTo(obj: MainNavigatorRoutes.Setting)
             ),
         new CustomListTile(
             new Icon(icon: Icons.outline_mail, size: 24, color: CColors.TextBody2),
             "意见反馈",
             trailing: CustomListTileConstant.defaultTrailing,
             onTap: () => {
             AnalyticsManager.ClickEnterAboutUs();
             this.widget.actionModel.mainRouterPushTo(obj: MainNavigatorRoutes.Feedback);
         }),
         new CustomListTile(
             new Icon(icon: Icons.outline_sentiment_smile, size: 24, color: CColors.TextBody2),
             "关于我们",
             trailing: CustomListTileConstant.defaultTrailing,
             onTap: () => this.widget.actionModel.mainRouterPushTo(obj: MainNavigatorRoutes.AboutUs)
             )
     }
                    )
                ));
 }
Пример #2
0
 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()
     }
                        )
                    )
                ));
 }