enum ConnectivityResult {
bluetooth,
wifi,
ethernet,
mobile,
none
}
final connectivityProvider = StreamProvider<ConnectivityResult>((ref){
...
})
final repoProvider = FutureProvider<List>((ref) async {
ref.watch(
connectivityProvider.selectAsync(
// WHAT DO TO HERE.
(data) => ConnectivityResult.wifi,
),
);
...
});
I want to listen only the "ConnectivityResult.wifi" to trigger rebuild for repoProvider.
Thanks to Randal comments and after reading the documentation, the problem is solved. Thanks a lot.