redirect to page update profile

This commit is contained in:
Valentin CZERYBA 2025-01-04 14:25:34 +01:00
parent 82c31acf99
commit 39b3efca33

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'dart:io'; import 'dart:io';
import '../pages/EditProfile.dart';
import 'alert.dart'; import 'alert.dart';
import '../variable/globals.dart' as globals; import '../variable/globals.dart' as globals;
@ -108,7 +108,10 @@ class MyDrawer extends StatelessWidget with ShowAlertDialog {
leading: Icon(Icons.account_circle), leading: Icon(Icons.account_circle),
title: Text('Update profile'), title: Text('Update profile'),
onTap: () { onTap: () {
Navigator.pop(context); // Close the drawer Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (_) => EditProfile())); // Close the drawer
}, },
), ),
ListTile( ListTile(