feat(app): Feed, recipe, blog posts, diet and plan show and index pages, state management, API implementation and layouts

This commit is contained in:
2024-05-08 14:11:18 +03:00
parent 404b22e78a
commit 76a29ebf67
45 changed files with 2759 additions and 21 deletions

View File

@@ -140,12 +140,13 @@ class MyProfileScreen extends StatelessWidget {
/// Section Widget
_buildInfo(BuildContext context, MyProfileLoadedState state) {
return Column(children: [
GestureDetector(
onTap: addImage(context),
return Column(
children: [
GestureDetector(
onTap: () => addImage(context),
child: CachedNetworkImage(
imageUrl:
dotenv.env['STORAGE_URL']! + state.user?['profile_photo_path'],
imageUrl: dotenv.env['STORAGE_URL']! +
(state.user?['profile_photo_path'] ?? ''),
imageBuilder: (context, imageProvider) => CircleAvatar(
backgroundImage: imageProvider,
radius: 60,
@@ -153,14 +154,16 @@ class MyProfileScreen extends StatelessWidget {
placeholder: (context, url) => CircularProgressIndicator(),
errorWidget: (context, url, error) => CircleAvatar(
child: Icon(Icons.person),
backgroundColor: Colors.grey[200],
backgroundColor: Colors.white,
radius: 60,
),
)),
AppbarSubtitle(text: state.user?['name']),
SizedBox(height: 20.v),
Text(state.userDetails?['additional_info']),
]);
),
),
AppbarSubtitle(text: state.user?['name'] ?? ''),
SizedBox(height: 20.v),
Text(state.userDetails?['additional_info'] ?? ''),
],
);
}
addImage(BuildContext context) {