feat(diary): Diary ID is passed on calendar click, new layouts for calendar, fixed nutrition chart

This commit is contained in:
2024-08-02 18:08:28 +03:00
parent f3d099fe0c
commit 5d13358fbc
5 changed files with 230 additions and 108 deletions

View File

@@ -68,10 +68,14 @@ class AppRouter {
builder: (context, state) => FeedScreenNew(),
),
GoRoute(
path: '/diary-screen',
name: 'diaryScreen',
builder: (context, state) => DiaryScreen(),
),
path: '/diary-screen',
name: 'diaryScreen',
builder: (context, state) {
if (state.extra != null)
return DiaryScreen(diaryID: state.extra as String);
else
return DiaryScreen(diaryID: '0');
}),
GoRoute(
path: '/chat-select-screen',
name: 'chatSelectScreen',
@@ -87,7 +91,8 @@ class AppRouter {
GoRoute(
path: '/blog-post-screen',
name: 'blogPostScreen',
builder: (context, state) => BlogPostScreen(blogPostID: state.extra as String),
builder: (context, state) =>
BlogPostScreen(blogPostID: state.extra as String),
),
GoRoute(
path: '/blog-post-edit-screen',