forked from eatvio/eatvio_app
feat(profile): send message and subscribe button
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/sub_model.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/widgets/sub_action_button_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class SubWidget extends StatefulWidget {
|
||||
final SubModel subModel;
|
||||
@@ -18,7 +20,15 @@ class _SubWidgetState extends State<SubWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {},
|
||||
onTap: () => GoRouter.of(context).pushNamed(
|
||||
'profileScreen',
|
||||
extra: Author(
|
||||
authorSlug: widget.subModel.slug,
|
||||
authorName: widget.subModel.name,
|
||||
authorProfileIcon: widget.subModel.profilePhotoUrl,
|
||||
authorIsMe: false,
|
||||
),
|
||||
),
|
||||
child: Ink(
|
||||
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||
child: Row(
|
||||
@@ -56,6 +66,7 @@ class _SubWidgetState extends State<SubWidget> {
|
||||
const Spacer(),
|
||||
SubActionButtonWidget(
|
||||
subActionType: widget.subModel.isSubscribe ? SubActionType.SendMessage : SubActionType.Subscribe,
|
||||
slug: widget.subModel.slug,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user