Full page reloading on widget update flutter

I am having an issue with my flutter app – I have a screen with a ListView of widgets that each have a “like” button and when the like button is pressed the application reads a riverpod provider and updates the app state. The issue is that when this update happens the entire screen is reloading rather than just the widget that changed. I am using the same button widget in another screen and am not having this issue. Any help is greatly appreciated.

This is the code for the screen:

class FeedScreen extends ConsumerWidget {
  const FeedScreen({super.key, required this.currentUserId});
  final UserID currentUserId;

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    // final currentUserValue = ref.watch(getUserProvider(currentUserId));
    return Scaffold(
      appBar: AppBar(),
      body: ResponsiveCenter(
              padding: const EdgeInsets.all(8.0),
              child: Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  mainAxisSize: MainAxisSize.max,
                  children: [
                    Expanded(child: FeedList(currentUserUid: currentUserId,)),
                  ]))
        // })
    );
  }
}
class FeedList extends ConsumerWidget {
  const FeedList({super.key, required this.currentUserUid});
  final String currentUserUid;

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    debugPrint("FEED LIST");
    final feedListVal = ref.watch(fetchFeedProvider);
    // ScrollController controller = ScrollController();

    return AsyncValueWidget(
      value: feedListVal,
      data: (feedListVal) {
        return feedListVal.isEmpty
          ? const Center(child: Text("Feed is empty"))
          : ListView.builder(
              itemCount: feedListVal.length,
              itemBuilder: (BuildContext context, int index) {
                // final userValue = ref.watch(getUserProvider(feedListVal[index].author));
                  // return AsyncValueWidget(
                  //   value: userValue,
                  //   data: (user) {
                      return FeedItem(timelineItem: feedListVal[index], userId: currentUserUid);
                  //   }
                  // );
              });
      }
    );
  }
}
class FeedItem extends StatelessWidget {
  const FeedItem({
    super.key,
    required this.timelineItem,
    required this.userId
  });

  final TimelineItem timelineItem;
  final String userId;
  
  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {
        context.goNamed(
          AppRoute.eventDetails.name,
          pathParameters: {
            'eventId': timelineItem.eventId
          }
        );
      },
      child: Center(
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Card(child: Padding(
            padding: const EdgeInsets.all(8.0),
            child: Column(
              children: [
                Row(
                  children: [
                    CircleAvatar(backgroundImage: NetworkImage(timelineItem.authorPfpUrl),),
                    Padding(
                      padding: const EdgeInsets.all(4.0),
                      child: Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            timelineItem.event != null
                              ? '${timelineItem.authorName} added content to ${timelineItem.event!.name}'
                              : timelineItem.authorName,
                            textAlign: TextAlign.start,),
                          Text(Jiffy.parseFromDateTime(timelineItem.createdAt).fromNow(), style: const TextStyle(color: Colors.grey),)
                        ],
                      ),
                    ),
                  ],
                ),
                const Divider(),
                Text(timelineItem.text),
                if (timelineItem.imageUrls.isNotEmpty)
                  // TODO: make this show more than one image or expand to view all images
                  Image.network(timelineItem.imageUrls[0]),
                const Divider(),
                Row(
                  mainAxisSize: MainAxisSize.max,
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text("${timelineItem.likes.length} Likes", textAlign: TextAlign.left,),
                    Text("${timelineItem.comments.length} Comments", textAlign: TextAlign.right,)
                  ],
                ),
                const Divider(),
                Row(
                  mainAxisSize: MainAxisSize.max,
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  children: [
                    LikeTimelineItemButtonWidget(
                      eventId: timelineItem.eventId,
                      timelineItemId: timelineItem.id,
                      currentUserUid: userId,
                      likedByIds: timelineItem.likes
                    ),
                    ElevatedButton.icon(
                      onPressed: () {
                        // _showFullModal(context, timelineItem.id);
                      }, 
                      icon: const Icon(Icons.comment), 
                      label: const Text("Comment")
                    )
                  ],
                )
              ],
            ),
          )),
        ),
      )
    );
  }
}

The like button widget code:

class LikeTimelineItemButtonWidget extends ConsumerWidget {
  const LikeTimelineItemButtonWidget({
    // required this.uid,
    required this.eventId,
    required this.timelineItemId,
    required this.currentUserUid,
    required this.likedByIds,
    super.key,
  });

  // final UserID uid;
  final EventID eventId;
  final String timelineItemId;
  final UserID currentUserUid;
  final List<UserID> likedByIds;

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    ref.listen<AsyncValue>(
      likeTimelineItemControllerProvider,
      (_, state) => state.showAlertDialogOnError(context)
    );

    final state = ref.watch(likeTimelineItemControllerProvider);
    final liked = likedByIds.contains(currentUserUid);
    
    if (liked) {
      return ElevatedButton.icon(
        style: ElevatedButton.styleFrom(
          backgroundColor: Theme.of(context).primaryColor.withOpacity(0.4),
        ),
        onPressed: () => {
          debugPrint("like button pressed"),
          ref
            .read(likeTimelineItemControllerProvider.notifier)
            .likeTimelineItem(eventId, timelineItemId, currentUserUid, likedByIds)
        },
        icon: Icon(Icons.thumb_up),
        label: Text("Like")
      );
    } else {
      return ElevatedButton.icon(
        onPressed: () => {
          debugPrint("like button pressed"),
          ref
            .read(likeTimelineItemControllerProvider.notifier)
            .likeTimelineItem(eventId, timelineItemId, currentUserUid, likedByIds)
        },
        icon: Icon(Icons.thumb_up),
        label: Text("Like")
      );
    }
  }
}

The code for the like button controller:

@riverpod
class LikeTimelineItemController extends _$LikeTimelineItemController with NotifierMounted {
  @override
  FutureOr<void> build() {
    ref.onDispose(setUnmounted);
  }

  Future<bool> likeTimelineItem(EventID eventId, String timelineItemId, UserID likingUserID, List<UserID> likedByIds) async {
    try {
      final timelineItemsRepository = ref.read(timelineItemsRepositoryProvider);
      state = const AsyncLoading();
      final value = await AsyncValue.guard(
        () => timelineItemsRepository.toggleLikeTimelineItem(timelineItemId, likingUserID, eventId, likedByIds));
      final success = value.hasError == false;
      if (mounted) {
        state = value;
      }
      return success;
    } catch (e, st) {
      debugPrint(e.toString());
      debugPrint(st.toString());
      if (mounted) {
        state = AsyncError(e, st);
      }
      return false;
    }
  }
}

And the code for the provider that pulls the screen’s content:

@riverpod
Future<List<TimelineItem>> fetchFeed(FetchFeedRef ref) async {
  final user = await ref.watch(watchUserProvider.future);
  debugPrint("[FEED SERVICE - fetchFeed] - user: $user");
  final friends = await ref.watch(friendsListStreamProvider(user).future);
  debugPrint("[FEED SERVICE - fetchFeed] - friends: $friends");
  return friends.isEmpty
      ? []
      : await ref.watch(
          watchFeedProvider(friends.map((user) => user.id).toList()).future);
}

And the code for the controller:

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật