コード例 #1
0
 Widget _buildLogoutBtn()
 {
     return(new CustomButton(
                padding: EdgeInsets.zero,
                onPressed: () => {
         ActionSheetUtils.showModalActionSheet(new ActionSheet(
                                                   title: "确定退出当前账号吗?",
                                                   items: new List <ActionSheetItem> {
             new ActionSheetItem("退出", type: ActionType.destructive,
                                 () => {
                 AnalyticsManager.ClickLogout();
                 this.widget.actionModel.logout();
             }),
             new ActionSheetItem("取消", type: ActionType.cancel)
         }
                                                   ));
     },
                child: new Container(
                    height: 60,
                    color: CColors.White,
                    child: new Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: new List <Widget> {
         new Text(
             "退出登录",
             style: CTextStyle.PLargeError
             )
     }
                        )
                    )
                ));
 }