feat(deepLinks): added chat and profile deeplinks

This commit is contained in:
Username1548
2025-09-10 08:08:58 +03:00
parent 77666aca0e
commit 82bc51e45c
17 changed files with 69 additions and 122 deletions

View File

@@ -65,14 +65,7 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
onTap: () {
GoRouter.of(context).pushNamed(
'profileScreen',
extra: Author(
authorSlug: state.feedBlogPostList[widget.index].author.authorSlug,
authorName: state.feedBlogPostList[widget.index].author.authorName,
authorProfileIcon: state.feedBlogPostList[widget.index].author.authorProfileIcon.contains('https')
? state.feedBlogPostList[widget.index].author.authorProfileIcon
: baseUrl + state.feedBlogPostList[widget.index].author.authorProfileIcon,
authorIsMe: state.feedBlogPostList[widget.index].author.authorIsMe,
),
extra: state.feedBlogPostList[widget.index].author.authorSlug,
);
},
child: CircleAvatar(

View File

@@ -108,12 +108,7 @@ class _CommentsWidgetState extends State<CommentsWidget> {
onTap: () {
GoRouter.of(context).pushNamed(
'profileScreen',
extra: Author(
authorSlug: comment.authorSlug,
authorName: comment.authorName,
authorProfileIcon: comment.authorProfileIcon.contains('https') ? comment.authorProfileIcon : baseUrl + comment.authorProfileIcon,
authorIsMe: isMe,
),
extra: comment.authorSlug,
);
},
child: CircleAvatar(

View File

@@ -25,12 +25,7 @@ class ConsultantWidget extends StatelessWidget {
onTap: () {
GoRouter.of(context).pushNamed(
'profileScreen',
extra: Author(
authorSlug: consultant.slug,
authorName: consultant.name,
authorProfileIcon: consultant.photo,
authorIsMe: (sl<ProfileAvatarCubit>().state as ProfileAvatarStateLoaded).profile.slug == consultant.slug ? true : false,
),
extra: consultant.slug,
);
},
borderRadius: BorderRadius.circular(20),

View File

@@ -169,12 +169,7 @@ class _PlanWidgetState extends State<PlanWidget> {
onTap: () {
GoRouter.of(context).pushNamed(
'profileScreen',
extra: Author(
authorSlug: widget.plan.author.authorSlug,
authorName: widget.plan.author.authorName,
authorProfileIcon: widget.plan.author.authorProfileIcon,
authorIsMe: widget.plan.author.authorIsMe,
),
extra: widget.plan.author.authorSlug,
);
},
child: Padding(