Questions tagged [flutter-state]

369 questions
0
votes
1 answer

Flutter UI only changes if i manualy refresh the page

I have two forms in a tab bar. I'm using Getx for state management. All fields in those forms listen to a .obs variable. The forms fields are updating to the variable changes. How ever one field only reflect changes when that page is revisited. I'm…
0
votes
1 answer

Why parent widget setState disables child widget setState in flutter?

I try to create a date picker for my flutter app. At first i can choose the day i want and the color of selected day will change. The problem is when i change the month or year in drop down button, I can't change selected day. Actually all things…
0
votes
2 answers

Flutter problem with TypeErrorImpl was thrown building

Hello everyone I am using the Get.to(Page()) and when I navigate to the page I get the following error and I don't understand why: Error: ======== Exception caught by widgets library ======================================================= The…
Alex97
  • 401
  • 1
  • 8
  • 21
0
votes
2 answers

Flutter GetX Obx do not update UI

I have a screen that I'd put all body in an Obx , I have a widget that has a parameter named activeIndex like this AnimatedSmoothIndicator( activeIndex: homeController.carouselPage.value, count: homeController.posts[index].images.length, …
mm sh
  • 192
  • 3
  • 18
0
votes
1 answer

API data from provider seems to get lost during Navigation

I am a beginner level Flutter developer trying to resolve the issue with the Navigation stack. In the existing app: When user logs in to the app, login api call is shooted Homescreen is rendered with Navigator.popUntill method All the APIs in the…
0
votes
1 answer

What is GetX Controller?

I am new with getX and I don't understand what is the purpose of GetX Controller. Based on my understanding, It basically hold variables and this is where everything changes inside the state. Can someone explain further
0
votes
1 answer

How can I call setState() safely after returning a value from a dialog in Flutter?

Here is the problem: I have a list of items displayed in a list view. I can edit these items with the dialogs displayed by clicking on them. After editing and closing the dialog, I also need to update the items on the list view. I'm currently doing…
rasitayaz
  • 400
  • 2
  • 16
0
votes
3 answers

Data not updating with Provider, Flutter

After the user changes the data, the UI doesn't update the data with Provider. The API calls are always statusCode: 200 but the UI is not updating unless I refresh/build the page again. I assume that the setting state method is not set up correctly…
GrandMagus
  • 600
  • 3
  • 12
  • 37
0
votes
1 answer

Flutter sync state between 2 instances of the same widget on different pages

I have a question about my use case: assume we are currently on screen A which shows an instance of my chart-widget (amongst other things). I want to give the user the opportunity to show that chart on the full app-screen by allowing to tap on a…
WieFel
  • 91
  • 9
0
votes
1 answer

Not able to show multiple timer in flutter

I am creating a Chat Polling feature and in chat polling I am showing timer for every new poll. Everything is working fine for the first poll but when I create a 2nd poll form backend new poll is creatine good with new question but the first poll…
0
votes
1 answer

change value onTap

I have 2 Inkwells that are controllers of a pageView, when I press on either is switches to a corresponding page. Padding( padding: const EdgeInsetsDirectional.fromSTEB(0, 12, 1, 0), …
0
votes
1 answer

Flutter: In RiverPod , how to alter state model's variables directly?

I am currently learning River Pod and also new to flutter. When setting new state in StateNotifer , I need to create a new model and replace the state But directly changing is not working class CounterModel { CounterModel(this.count, this.age); …
RagAnt
  • 1,064
  • 2
  • 17
  • 35
0
votes
1 answer

Flutter/Dart FutureBuilder - How to store a snapshot.data in a variable and pass the value to other widget?

I'm new to Flutter, and I can't achieve display the snapshot.data value in a widget outside from futureBuilder scope, It's possible to do this? if not, what is the better way to do this? //... var result = '0.00'; Row(children: [ const…
0
votes
1 answer

Getx fetch changes of variables

I have a getx Controller. In it i have declared two variables, which will be updated var percentageEVS = 0.obs; var percentOthers =0.obs; Im trying to change the values of these variables using the following function calculatespentTime(){ …
Febin Johnson
  • 277
  • 1
  • 6
  • 21
0
votes
2 answers

How to Sort, Filter, Search the data which I get from REST API (JSON Form) and Update the UI immediately using State Management Like BLOC or PROVIDER?

This is the data from the API: { "httpStatus": "OK", "httpStatusCode": 200, "success": true, "message": "Successfully fetched all agents.", "apiName": "Get all agents.", "data": [ { "id": 1 "prod_name": "Apple" …