删除账号
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:food_health/api/dto/user_profile_dto.dart';
|
||||
import 'package:food_health/api/endpoints/profile_api.dart';
|
||||
@@ -30,6 +31,7 @@ class _MyPageState extends State<MyPage> with AutomaticKeepAliveClientMixin {
|
||||
setState(() {
|
||||
_userProfile = res;
|
||||
});
|
||||
_showEditProfile();
|
||||
}
|
||||
|
||||
void _goEdit() async {
|
||||
@@ -37,6 +39,33 @@ class _MyPageState extends State<MyPage> with AutomaticKeepAliveClientMixin {
|
||||
_init();
|
||||
}
|
||||
|
||||
void _showEditProfile() {
|
||||
if (_userProfile.qStatus != 1) {
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
builder: (_) => CupertinoAlertDialog(
|
||||
title: Text("Complete Your Profile"),
|
||||
content: Text("Let’s get to know you better! Please take a quick survey to personalize your experience."),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: Text("Not Now"),
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text("Take Survey"),
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
_goEdit();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SafeArea(
|
||||
|
||||
Reference in New Issue
Block a user