Skip to main content

Questions tagged [riverpod]

For questions relating to the "riverpod" package for the Flutter framework.

0 votes
1 answer
20 views

Why the state is not persistent over screens of stateNotifierProvider of riverpod in flutter?

I am trying to persist the state of a form globally but what i am getting is the default value when i am navigating to another screen in the same project? i have found similar post here [https://...
Deepak Singh's user avatar
0 votes
0 answers
19 views

Correct flow for retrieving access token of OIDC provider using Firebase Auth in Flutter

I'm using Firebase Auth in my app and I'm signing in using an OAuthProvider like this: final credential = await FirebaseAuth.instance.signInWithProvider( OAuthProvider('oidc.my-oidc-provider') .....
katkak's user avatar
  • 199
1 vote
1 answer
31 views

Asyncvalue guard Method inside build Riverpod

below is a code snippet from a tutorial I am trying to learn. appreciate if you could tell me why we are not using protection : asyncvalue.guard inside build() but later used when calling the same ...
Mazhar Salam's user avatar
-1 votes
0 answers
49 views

How to force a Provider to notify on change?

I have a Provider that returns a Map. the map reference is constant, however the content of the map changes. When I watch my provider in a ConsumerWidget, my build method does not get trigger. Even ...
Elad Maimoni's user avatar
  • 4,223
0 votes
0 answers
22 views

Is there a pattern for signals with arguments?

With the recent blow up of signals in almost every major js ui framework, there is one part of it I don't fully understand: Say for example one wants to create signals for cached Rest queries. My ...
Flo's user avatar
  • 56
0 votes
1 answer
31 views

How can I watch a change in the list size with Riverpod on a Flutter app?

I have a list of todo elements managed by: @Riverpod(keepAlive: true) class TodosNotifier extends _$TodosNotifier { @override List<Todo> build() { return [.....some elements here.....]; ...
Randomize's user avatar
  • 9,023
0 votes
0 answers
27 views

Flutter go_router redirects to / on state change when it should not redirect at all

I have this router: import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import 'package:horizon/providers/user....
Jacob Miller's user avatar
0 votes
1 answer
41 views

How to disable skipLoadingOnRefresh with flutter riverpod using switch expression

Lets say i have this simple future riverpod which is @riverpod Future<double> balance(BalanceRef ref) async { await Future.delayed(const Duration(seconds: 5)); return 100; } and inside ...
anas's user avatar
  • 158
-1 votes
1 answer
50 views

Type cast error when using Ref in a class as a parameter with ConsumerStatefulWidget in Flutter Riverpod

I am using Flutter with Riverpod and have a utility class MapServices that relies on Ref to access state providers. I'm trying to use this class within a ConsumerStatefulWidget, but I'm encountering a ...
Aadarsh Pandey's user avatar
0 votes
2 answers
41 views

Ref.read riverpod provider in a button onPressed getting disposed as soon it is initiated

When trying to read a collection from cloud_firestore, I'm using riverpod provider. import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart';...
pbs_mhl's user avatar
  • 42
0 votes
0 answers
54 views

GoRouter rebuilds on redirect with Firebase and Riverpod

I am working on a mobile application using Riverpod with code generation without hooks as state management and Firebase for authentication. Innitially i was using the defalt navigation but after ...
Atanas Nankinski's user avatar
0 votes
1 answer
59 views

How to Display Only One Edit Icon for Selected Container in Flutter?

I'm trying to implement a feature where an edit icon appears only for the container the user is hovering over. Currently, when I hover over one container, edit icons appear for all four containers. ...
caroch's user avatar
  • 837
0 votes
1 answer
62 views

Best way to pass data from form to a function in Flutter?

This is the program I have running: I have an app that is a single page. The page's widgets are defined in separate files. I have data that comes from the serial port and data that is entered in a ...
kdesroch1's user avatar
0 votes
0 answers
19 views

Flutter RIverpod; How to update UI from Search results

Iam using a defaultProvider = ref.watch(defaultProvider) which is a FutureProvider to fetch data from an api source and using the result to populate aListView.Builder using ref.watch(countryProvider)....
Ae Ri's user avatar
  • 238
0 votes
1 answer
30 views

How I can update user information displayed in the UI when data user data stored in shared preferences is updated using riverpod in flutter

I'm still kind of a newbie in flutter. I want to use riverpod state management to update UI showing username and email of user immediately after user updates his or her information. The information ...
ecnyakiha's user avatar

15 30 50 per page
1
2 3 4 5
96