All Questions
605
questions
1
vote
2
answers
56
views
Call setState outside widgets
Can I call setState from outside the widgets. I try to register the setState of the children widgets - and call it from outside. It don't seem to work - why is that?
import 'package:flutter/material....
0
votes
1
answer
46
views
Riverpod Flutter State: Struggling with Inconsistent State Behavior
I'm currently working on a Flutter app using Riverpod, and I've encountered an issue with state management that I don't understand. To debug, I simplified my code to this example, which you can run to ...
1
vote
1
answer
42
views
Do Bloc State Variables Persist when using Register Factory?
I'm using dependency injection with Bloc . When I initialize my Bloc I call:
getIt.registerFactory<RemoteGroceryItemsBloc>(
() => RemoteGroceryItemsBloc(getIt(),getIt()));
I basically ...
0
votes
0
answers
41
views
Can't update a riverpod notifier when I inject a service
Introduction
I'm working with riverpod for state management in my application.
I simply want to update a variable when I call my notifier.
The problem occurs when I inject my service into this ...
0
votes
0
answers
32
views
bottomNavigationBar reset state bloc
When switching tabs, reset the state value of the state manager bloc. There is no update of the state when switching to stack. It is the tabs that are being updated.I have been working with flutter ...
-1
votes
1
answer
68
views
Load multiple images one time in flutter
Let's say I have 5 images and I need to show it using Image.memory. When I load them directly at the same time it always says :Invalid image while if I load only one image, that's really fine. Is ...
0
votes
1
answer
67
views
How to assign a property to a variable from outside
How to assign a property milks to a variable activeMilk from outside.
The instance member 'widget' can't be accessed in an initializer.
Try replacing the reference to the instance member with a ...
0
votes
1
answer
39
views
Flutter - How to change state of child widget when parent state is changed?
I'm new to Flutter and I've been trying to create a simple utility in my app with a few input fields that are disabled until the "Edit" button is clicked. Once it is clicked all the fields ...
0
votes
0
answers
42
views
Issue with Flutter setState not updating Text widget value
I'm starting to get desperate, I'm not understanding a problem related to state in Flutter. I have the following case:
class Testing extends StatefulWidget {
const Testing({super.key});
@override
...
1
vote
2
answers
87
views
ChangeNotifier's consumer's state not getting updated
Components that are using the Notifier are not getting updated, when the child components are changing the state
state_provider.dart
class StateProvider extends ChangeNotifier {
// user data
...
0
votes
1
answer
62
views
State Transfer from a model using Riverpod flutter
Now I'm learning Riverpod.
Before this, I do the functionality using the Provider package and there I used ChangeNotifier.
After studying the documentation https://codewithandrea.com/articles/flutter-...
0
votes
0
answers
32
views
Flutter | Persisting Navigator State Using Hydrated Bloc with the Bloc Design Pattern
Currently, I am working on a mobile app developed in Flutter and Dart that uses Bloc as its design pattern. It is a multiple-page app with various navigation scenarios including a conditional launch ...
1
vote
0
answers
47
views
Should I use immutable or mutable state for a JSON tree editor in Flutter?
I'm building a tool in Flutter that allows users to edit JSON files. The application represents the JSON data as a tree of nodes. I'm considering two approaches for managing the state of the JSON data:...
1
vote
1
answer
54
views
Show CircularProgressIndicator in custom button when state app is loading using flutter provider package
I hope someone can help me with this :)
I have a flutter app and use the provider package to manage state.
What I want to achieve:
When I click on the button and delete an order I want to notify my ...
0
votes
0
answers
101
views
How to pass different Riverpod Ref types to a callback?
I will omit any code here, as this question is rather conceptual.
I'm currently developing a Flutter App using riverpod to manage the components of the app-wide state, such as session tokens, etc.
I ...