This commit is contained in:
Felipe
2024-02-26 18:15:06 -05:00
parent 25c898ba19
commit 906ebb4330
2 changed files with 113 additions and 103 deletions
+7 -2
View File
@@ -12,7 +12,7 @@ class GeneralDrawerHeader extends StatelessWidget {
final user = context.read<MyUserBloc>().state.user!;
return ListTile(
onTap: () {
Navigator.pop(context);
// Navigator.pop(context);
Navigator.push(
context,
CupertinoPageRoute(
@@ -43,7 +43,12 @@ class GeneralDrawerHeader extends StatelessWidget {
imageProvider = NetworkImage(pictureUrl);
}
return pictureContainerWidget(imageProvider);
return Hero(
tag: 'picture-profile',
child: pictureContainerWidget(
imageProvider,
),
);
}
Widget pictureContainerWidget(ImageProvider<Object>? imageProvider) {
+7 -2
View File
@@ -68,7 +68,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
},
label: 'Perfil',
),
body: BlocBuilder<MyUserBloc, MyUserState>(builder: (context, state) {
body: BlocBuilder<MyUserBloc, MyUserState>(
builder: (context, state) {
if (state.status == MyUserStatus.success) {
_nameController.text = state.user!.name ?? '';
_emailController.text = state.user!.email ?? '';
@@ -175,7 +176,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
} else {
return const Center(child: CircularProgressIndicator());
}
}),
},
),
),
);
}
@@ -261,7 +263,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
});
}
},
child: Hero(
tag: 'picture-profile',
child: pictureContainerWidget(imageProvider),
),
);
}