forked from eatvio/eatvio_app
feat: webview
This commit is contained in:
@@ -120,11 +120,12 @@ class MenuScreen extends StatelessWidget {
|
||||
|
||||
_onTapLogout(BuildContext context) {
|
||||
return () async {
|
||||
final response = await sl<Dio>().post(
|
||||
baseUrl + '/api/profile/logout',
|
||||
);
|
||||
|
||||
if (response.statusCode == 204) {
|
||||
try {
|
||||
await sl<Dio>().post(
|
||||
baseUrl + '/api/profile/logout',
|
||||
);
|
||||
} catch (e) {
|
||||
} finally {
|
||||
await TokenStorage.removeTokenInStorage();
|
||||
GoRouter.of(context).go('/auth-screen');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user