Ejemplo n.º 1
0
 Widget _buildLogoutBtn(BuildContext context)
 {
     return(new CustomButton(
                padding: EdgeInsets.zero,
                onPressed: () => {
         ActionSheetUtils.showModalActionSheet(new ActionSheet(
                                                   title: "确定退出当前账号吗?",
                                                   items: new List <ActionSheetItem> {
             new ActionSheetItem("退出", ActionType.destructive,
                                 () => {
                 this.widget.actionModel.logout();
                 JPushPlugin.deleteJPushAlias();
             }),
             new ActionSheetItem("取消", ActionType.cancel)
         }
                                                   ));
     },
                child: new Container(
                    height: 60,
                    decoration: new BoxDecoration(
                        CColors.White
                        ),
                    child: new Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: new List <Widget> {
         new Text(
             "退出登录",
             style: CTextStyle.PLargeError
             )
     }
                        )
                    )
                ));
 }
Ejemplo n.º 2
0
 public static void clearUserInfo()
 {
     if (PlayerPrefs.HasKey(_userInfo))
     {
         PlayerPrefs.DeleteKey(_userInfo);
     }
     JPushPlugin.deleteJPushAlias();
 }