Skip to content

Commit

Permalink
Merge pull request #106 from NanoNish/open-from-following
Browse files Browse the repository at this point in the history
feat: open user profile from following list
  • Loading branch information
aman-singh7 authored Nov 20, 2022
2 parents 2e255cc + 84bbf91 commit 59c228e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/presentation/profile/widgets/following_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import '../../../data/constants/strings.dart';
import '../../../data/constants/styles.dart';
import '../../../utils/snackbar.dart';
import '../../../utils/user_util.dart';
import '../../home/bloc/home_bloc.dart';
import '../bloc/profile_bloc.dart';
import '../components/follow_button.dart';
import '../components/following_button.dart';
Expand Down Expand Up @@ -65,6 +66,15 @@ class FollowingView extends StatelessWidget {
final user = state.following![index];
final followNotifier = ValueNotifier(true);
return ListTile(
onTap: () {
context
.read<ProfileBloc>()
.add(FetchDetails(userId: user.id));

context
.read<HomeBloc>()
.add(const BottomNavItemPressed(index: 3));
},
leading: SizedBox(
width: 35.r,
child: CachedNetworkImage(
Expand Down

0 comments on commit 59c228e

Please sign in to comment.