Skip to content

Commit

Permalink
fix: change read to watch for featureFlagProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-endymion committed Jan 9, 2025
1 parent 46954fe commit aec59d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/app/features/feed/views/pages/feed_page/feed_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FeedPage extends HookConsumerWidget {
.select((state) => (state?.hasMore).falseOrValue),
);
final showTrendingVideos =
ref.read(featureFlagsProvider.notifier).get(FeedFeatureFlag.showTrendingVideo);
ref.watch(featureFlagsProvider.notifier).get(FeedFeatureFlag.showTrendingVideo);

useScrollTopOnTabPress(context, scrollController: scrollController);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class GridLoader extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final buyNftFeatureEnabled =
ref.read(featureFlagsProvider.notifier).get(WalletFeatureFlag.buyNftEnabled);
ref.watch(featureFlagsProvider.notifier).get(WalletFeatureFlag.buyNftEnabled);

final width =
(MediaQuery.sizeOf(context).width - ScreenSideOffset.defaultSmallMargin * 2 - 12.0.s) / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class NftsTabFooter extends ConsumerWidget {
final searchVisibleProvider = walletSearchVisibilityProvider(tabType);
final isSearchVisible = ref.watch(searchVisibleProvider);
final buyNftFeatureEnabled =
ref.read(featureFlagsProvider.notifier).get(WalletFeatureFlag.buyNftEnabled);
ref.watch(featureFlagsProvider.notifier).get(WalletFeatureFlag.buyNftEnabled);

return SliverToBoxAdapter(
child: buyNftFeatureEnabled && !isSearchVisible
Expand Down

0 comments on commit aec59d6

Please sign in to comment.