Questions tagged [flutter-change-notifier]
189 questions
1
vote
1 answer
when I am calling the provider in the inistate return data got null
My question is.......When the app Started(initial start) circular progress indicator appears & didn't got any data.....My app has 3 tabs(using tabbar), but when I swicth between my tabs & when I came to the Home tab now I got the data & ui render…

Imesh Madushanka
- 45
- 1
- 7
1
vote
1 answer
Flutter error- _InheritedProviderScope(value: Instance of 'Provider', listening to value)
I am currently working with an app in Flutter and I am using Provider for state management.
I am using ChangeNotifierProvider of . AvProvider is a Class as class AvProvider extends ChangeNotifier to open a time picker to select time using Methods…

Lin
- 11
- 3
1
vote
3 answers
How to use method from one Change notifier class in another change notifier class provider
I want to use fetchdata() in another provider method and initialise variables.

Tarun siva sai
- 21
- 4
1
vote
1 answer
Create ListView with infinite scrolling by provider: setState() or markNeedsBuild() called during build
I am trying to create ListView where items are built while the screen is being scrolled. I am trying to add content by using provider.
I get an error "setState() or markNeedsBuild() called during build" when calling notifyListener() inside…

Kouta Nakano
- 595
- 3
- 15
1
vote
0 answers
How can I implement Sign Up/Login logic with Provider. Flutter, Dart, Mobile Development
Let' say I have three files: main.dart, LoginScreen.dart, HomePageScreen.dart. I am utilizing Provider architecture for state management and wrapping MaterialApp.
When the app startup, the main.dart file checks whether the user is already Logged in…

XYZ
- 83
- 11
1
vote
1 answer
Flutter ChangeNotifierProvider issue
I have a ProperyListPage and on each list item clicked this is the action it does.
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangeNotifierProvider.value(
value: property,
child:…

blupointmedia
- 564
- 2
- 10
1
vote
1 answer
how can i create drowdownbutton with Riverpod Notifier?
I want to create DropDownButton with changenotifierProvider in Riverpod, but i can not write nicely my code. Please help me. I suppose, i just wrote 'watch' method, but i do not know how to read it. So, it should show the item which is chosen, and…

coldasspirit
- 127
- 1
- 11
1
vote
1 answer
Try to read data from a class but returns null instead of its actual value - using Flutter Provider
I have the following problem. I want to read a variable from class1. The command to read the variable comes from another class. However it returns null. This is not my actual code, however I wrote a demo app to illustrate the problem: when I press a…

strato_cruiser
- 23
- 6
1
vote
1 answer
When we use notifyListeners in ChangeNotifier?
Why we use sometimes notifyListeners and also why we do not use notifyListeners? How can we use a function in changenotifier ?
For instance, in this code, sometimes we used to notifyListeners, but sometimes we did not use notifyListeners (in login()…

coldasspirit
- 127
- 1
- 11
1
vote
0 answers
Flutter: Widget does not change dynamically on Tap
I want to dynamically change the screen with isUserRegistered of model.
If isUserRegistered is True, I wanna show Icon which sets isUserRegistered to false when clicked.
If isUserRegistered is False, I wanna hide Icon.
I tried to use setState, but…

Naoki Oshiumi
- 91
- 1
- 10
1
vote
0 answers
Can write userData to Firebase, Can't read from Firebase into fields : Flutter
I'm trying to read my UserData into form fields when the user tried to edit their information. I can write to Firebase, but I can't read and display user data into the built fields. Each userData is stored with the signed in user's mid as the…

hermie_brown
- 319
- 9
- 24
1
vote
0 answers
Update a dependent ChangeNotifierProvider from another independent StreamProvider's response in Flutter
I was initially developing my app with simple change notifier providers. Later I decided to use Firestore and StreamProvider. Now I have a stream that returns a list. I want to populate my list in the Change Notifier after getting data from the…

Sebastian Gomes
- 775
- 9
- 12
1
vote
1 answer
Calling notifyListeners() causes errors when called in deactivate() - Flutter
I have read all the questions related to this issue, but neither of them is similar to mine.
I have two pages: homepage and settings page. In the homepage, I listen to changes of provider with Consumer. In the settings page, I don't listen to…

Tugay
- 2,057
- 5
- 17
- 32
1
vote
1 answer
ChangeNotifierProvider between different pages
I've been searched but I didn't find any question (sorry If I there is some yet...)
My question is:
I have two pages, I use ChangeNotifierProvider in this two pages, but when I change a value in the second page and go back to the first page, the…

Jorge Perez Linares
- 11
- 1
1
vote
1 answer
How to use providers to load data before consuming
In my application I use provider in the following manner;
I create the schedule view like this;
await Navigator.of(context, rootNavigator: true).push(
MaterialPageRoute(
builder: (BuildContext context) =>
…

Janaka
- 2,505
- 4
- 33
- 57