Questions tagged [flutter-change-notifier-provider]
21 questions
2
votes
1 answer
How to combine features of FutureProvider/FutureBuilder (waiting for async data) and ChangeNotifierProvider (change data and provide on request)
What I wanted to achieve, was to retrieve a document from firestore, and provide it down the widget tree, and be able to make changes on the data of the document itself.
show something like "No data available/selected" when there's nothing to…

Cedric
- 470
- 6
- 20
1
vote
1 answer
Why do we need ChangeNotifierProvider instead of just using a ChangeNotifier?
I am trying to learn how to use flutter_riverpod for state management, I am having trouble understanding what the "need" for ChangeNotifierProvider is , same thing for StateNotifierProvider. Let's take the following ChangeNotifier for example…

Sahar_Sarraj
- 28
- 5
1
vote
1 answer
ChangeNotifierProvider not updating the listener
I have simplified my real app into the following code below to show the problem. I am basically trying to show the scroll offset of a list view on another widget (the real app is a lot more complex where the widget does other stuff with that…

sudoExclaimationExclaimation
- 7,992
- 10
- 47
- 105
1
vote
2 answers
Multiple ChangeNotifierProxyProviders to feed updates into ChangeNotifier
I have three ChangeNotifierProvider providers, let's call them A, B and C.
What I need is for changes in providers A and B to update provider C, but the code below isn't working.
MultiProvider(
providers: [
ChangeNotifierProvider(create:…

Vadim
- 1,916
- 2
- 19
- 39
1
vote
1 answer
How can I get my flutter video player to work for Chrome Web, correctly
I am getting videoplayer overflow. How do I resize my video player, so it correctly works. Error message "A RenderFlex overflowed by 93 pixels on the right" during window resizing.
import 'package:flutter/material.dart';
import…

Golden Lion
- 3,840
- 2
- 26
- 35
0
votes
2 answers
How can I have a color that is going to change, when I select a certain topic on Flutter. Can I use the notifier with the Color Widget?
So I am currently trying to figure out a way to give a color to a certain card depending on which subject the user has selected. I am usifier a notifier. Previously in my code, I was able to refer to look for a precise image that would be related to…

Adam Messier
- 1
- 1
0
votes
0 answers
Changing value of integer.toString() with Provider in flutter
I am new to flutter.
I am trying to display an integer value.
The value changes on some conditions. Now I am trying to update the widgets and the displaying value of the integer with Provider / ChangeNotifier but it doesn't work.
My…

Terrence Skill
- 89
- 9
0
votes
2 answers
Flutter Provider - How to add more info to user model after login
I'd like to add more info the following UserModel and make it available throughout all screens of the app. I've been struggling with the basics of Provider. Should I use a separate class extending the ChangeNotifier and store those additional…

Rod Rodrigues
- 53
- 1
- 9
0
votes
1 answer
Flutter: ChangeNotifierProvider does not listen to Changes
I am very new to flutter. I have added localization to my app and I made a Language Switcher. I am trying to provide the changes of the Language Switcher witch ChangeNotifierProvider. It works on all Strings except the Bottom Navigation Bar. It has…

Terrence Skill
- 89
- 9
0
votes
1 answer
Is it possible to allow multiple entities to use one global ChangeNotifier in flutter?
I'm designing an application that allows users to view content of their desired integrations (this could be anything such as twitter, bbc.co.uk etc...). I have a settings page in which I would like the user to authenticate the services they would…

PyShah
- 23
- 4
0
votes
1 answer
Save favorite posts in Local with provider in Flutter
I'm currently trying to use Provider to save articles once user tap on bookmark icon, new articles once tapped should show up on favourite page, I don't understand why it doesn't save anything.
Below my code used.
What do I wrong?
ArticleModel
class…

Pimpi Rimpà
- 75
- 1
- 8
0
votes
0 answers
Using ChangeNotifier to Update Home Widget with Button Press in Flutter
Here is the substance of my main.dart file:
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
Future main() async {
…

sharprock
- 1
- 1
0
votes
1 answer
is adding ChangeNotifierProvider Widget as Parent of MaterialApp a Flutter Best Practice?
Can I using the ChangeNotifierProvider on the top of my app tree? is it a good practice in Flutter?
Also running the MyApp Widget as Stateful widget is a good practice?
class _MyAppState extends State {
@override
void initState() {
…

guerrero
- 13
- 4
0
votes
0 answers
Widget is not rebuilding with Provider context.watch
I created a class LoginStore extending ChangeNotifier to state manage my application and i'm using Provider for dependency injection. According to the documentation, invoking context.watch() is enough to make the Widget listen for changes in the…

João Soares
- 43
- 1
- 8
0
votes
2 answers
Flutter: Prevent ChangeNotifier's notifyListeners from preventing the animation of the sending button whose state depends on the ChangeNotifier?
My actual app is a lot more complex but I have been able to simplify it down to this example which demonstrates the issue.
I have 2 buttons which are supposed to reflect the same data. In this example, I have 2 like (heart) buttons. They can either…

sudoExclaimationExclaimation
- 7,992
- 10
- 47
- 105