Questions tagged [statefulwidget]
339 questions
0
votes
2 answers
Refresh listview based on button click
I have a list of categories and products. I want that when I click on a category:
The selected category should change color to orange.
The products listview should be refreshed with the selected category's products.
I tried to add setState and try…

mcfred
- 1,183
- 2
- 29
- 68
0
votes
3 answers
how to use a picked image as background image in flutter?
I've used file_picker library so the user can select his favorite image and then use it as the background image in my application. Thing is, I can't cast it correctly. Here's some code:
floatingActionButton: FloatingActionButton(
…

Sajad Ziaee
- 17
- 1
- 7
0
votes
1 answer
Flutter: FutureBuilder keeps flashing
I have an issue when calling setState().
Here is a screen recording of the issue: https://cln.sh/ndL24t.
As you can see, clicking on the widget causes the picture to flash from loading to picture.
The problem is caused because I have two futures and…
user15782390
0
votes
1 answer
How do I save data from a stateful widget in Flutter?
I have implemented a TextField that allows user input in my flutter app. Now, I would like to save the user input data to a variable on pressing a button in order to use it later on. As I see it, in order to achieve this, I have to create a specific…

thebasqueinterdisciplinarian
- 27
- 1
- 9
0
votes
1 answer
Is using widget.[variable_name] the best way to reference StatefulWidget variables?
I have a variable friendsList that is passed to the FriendsFeed class. I reference the friendsList in the FriendsFeed State with widget.friendsList. Is using widget.[my_variable_name] to reference StatefulWidget variables the professional way to do…

CuriousCoder
- 262
- 4
- 14
0
votes
1 answer
Do Stateful Widgets safe data on my device?
I created an App with a few different pages. But when i navigate from one page to another - for example with a bottom Navigation bar - all the data the user can add or change on a page is deleted although I used Stateful Widgets.
Do I need firebase…

Dalon
- 566
- 8
- 26
0
votes
1 answer
Using StatefulWidget List having FutureBuilder as child shows no data till i hot reload and then calls future with no data immediately
I have a stateful widget which will show list of products, data will be fetched from api so I used future builder. Here problem is I can see data in log but not on widget class, it shows length 0 of list but as soon as I reload data shows for second…

upendra
- 21
- 1
- 4
0
votes
1 answer
How can I pass flutter textediting controller value from one stateless widget to another stateless widget
Here Is the main.dart file:
import 'package:flutter/material.dart';
import 'package:untitled/button.dart';
import 'package:untitled/form.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget…

S.n. Ahad
- 316
- 3
- 6
0
votes
0 answers
Flutter StreamProvider fails to update Widget state. How do I go around this?
I'm using a StreamProvider to capture changes that occur in Firestore and display them on the user homepage. When the user initially signs in or registers, they're directed to this homepage and expect to see their details, for which I use the…

Yash
- 67
- 5
0
votes
2 answers
Flutter ListView: widgets doesn't update
I have a listview that shows some items, inside a StatefulWidget :
ListView.separated(
shrinkWrap: true,
itemBuilder: (context, index) {
return RowItem(
item: rowsList[index],
index: index,
…

giozh
- 9,868
- 30
- 102
- 183
0
votes
1 answer
Stateful issues with widgets -- update from parent and update from inside
This is going to be way too long but I don't know where the problem is/what to do.
Updated: The values track properly if I use a StateLessWidget instead; so...
Purpose
At its core, I envisioned my TouchPoint to be a button that if tapped and…

ThorMJ
- 89
- 1
- 2
- 9
0
votes
1 answer
Why is a key sometimes not needed for a StatefulWidget?
I'm trying to better understand what is happening in the
official example
for AnimatedPositioned.
From this
article
(and accompanying video)
we know that even if the widget object itself remains the same, but just changes position
in the widget…

Sam
- 563
- 5
- 15
0
votes
1 answer
How to Update child stateful widget on update parent stateful widget
When ever update parent stateful widget it should also update child stateful widget.When ever I refresh Parent stateful widget not updating child stateful widget. Any one know how can I update both stateful widget when update parent stateful…

Harsh Sureja
- 1,052
- 1
- 9
- 22
0
votes
2 answers
achieve functionality like floating action button in flutter
how can I achieve this functionality with fixed at the bottom, above the list and the list gets scroll in flutter?
Thanks in advance!!!

Subhangi Pawar
- 413
- 1
- 6
- 12
0
votes
2 answers
Error: The getter 'title' isn't defined for the type 'RSSParser'
I wanted to implements a simple tutorial of how parsing an Rss Feed with Flutter, here is my code:
import 'package:flutter/material.dart';
import 'package:webfeed/webfeed.dart';
import 'package:http/http.dart' as http;
import…

user1444393
- 213
- 1
- 4
- 17