Commit d314b982 authored by Ilham Maulana's avatar Ilham Maulana 💻

fix: refresh profile state data after update

parent 511976a0
......@@ -5,9 +5,23 @@ import 'package:library_app/src/screens/form_screen.dart';
import 'package:library_app/src/widgets/navigations.dart';
import 'package:provider/provider.dart';
class Profile extends StatelessWidget {
class Profile extends StatefulWidget {
const Profile({super.key});
@override
State<Profile> createState() => _Profile();
}
class _Profile extends State<Profile> {
@override
void initState() {
super.initState();
Future.delayed(
Duration.zero,
() => Provider.of<AuthProvider>(context, listen: false).getUserDetail(),
);
}
@override
Widget build(BuildContext context) {
return Consumer<AuthProvider>(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment