skip to Main Content

Flutter – Why does using ref.watch in Riverpod cause my Notifier to be disposed and recreated, but ref.read does not?

I’m working with Flutter Riverpod and have encountered different behaviors when using ref.watch versus ref.read in my DumTabNotifier class. Here’s a simplified version of my code: import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:get/get.dart'; // Notifier class class DumTabNotifier extends Notifier<DumTabState> {…

VIEW QUESTION
Back To Top
Search