Questions tagged [statefulwidget]

339 questions
0
votes
2 answers

FutureBuilder load API data only once

I've called post type api to load data asynchronously on ListView using FutureBuilder but it called only once, I want to display infinite data loading on my ListView. Is their I missing to add some properties of FutureBuilder or ListView. Can anyone…
Dharini
  • 700
  • 7
  • 20
0
votes
0 answers

Flutter: How to pass the state from/to Custom Dialog Widget to another screen and back?

I have a container on my page which should have either image or text depending on the one that is given in the Custom Dialog widget. I have created this widget in a separate Stateless Class. I am calling this from the page where my container is…
Sri
  • 93
  • 8
0
votes
1 answer

StatefulWidget using BlocBuilder doesn't rebuild on state change

I'm using Flutter (BloC pattern) to build a widget that streams multiple camera feeds. When a feed is clicked on, it is shown in the main feed (think Google hangouts, where the face of whoever is speaking is shown front and centre, and others are…
0
votes
2 answers

Flutter FutureBuilder returning null data

I'm new to Flutter and Dart, and I'm trying to write a application to test it. I have an api that I'm getting the data for the app, and was trying to use the StatefulWidget and the FutureBuilder. When I run the method to call the api I have the…
guren
  • 122
  • 2
  • 9
0
votes
2 answers

setState() within StatefulWidget not working properly

The thing I'm trying to do is, to change the colour of a RawMaterialButton when the button is clicked. Read about StatefulWidget and it seemed like it should work, but for some reason it doesn't. flutter: Another exception was thrown: setState()…
Mantas
  • 3
  • 3
0
votes
1 answer

Flutter: Pass new values to a Stateful widget and update the view onTap

I have implemented google_maps_fltuter and I need to update the route on the map with new coordinates whenever the user clicks on a different route anywhere within the bordered rectangle (see the picture below). When the view is rendered initially,…
selected
  • 764
  • 2
  • 10
  • 19
0
votes
0 answers

How to create a Custom Drawer Stateful Widget from the given code?

I have solved the previous issue based on an existing solution to existing question. I want to change the color of CustomListTile which is child of ListView when onTap is clicked, and setting other children color into default one? I am still facing…
0
votes
0 answers

I am building a flutter app, my code was working fine until i got thrown by this exception called "Exception caused by Widgets Library"

when i run my app it probably comes up with a red screen printing invalid Argument(s). I think the problem is with my code, please point out if any or if this is some other problem. I/flutter ( 4556): EXCEPTION CAUGHT BY WIDGETS LIBRARY I/flutter (…
0
votes
1 answer

Flutter, Inconsistent Widget build

So I have a Form Screen (With its own scaffold) like this : class InputForm extends StatelessWidget { final Receipt initialReceipt; InputForm({this.initialReceipt}){ print("InputForm() called"); } @override Widget build(BuildContext…
erluxman
  • 18,155
  • 20
  • 92
  • 126
0
votes
1 answer

Does state as class requires SatefulWidget?

I am trying to learn the bloc pattern in flutter and creating one sample app using bloc framework. The app is a counter and has two buttons beneth the counter text field. Upon clicking on the True and False button currently Ii am just incrementing…
Hunt
  • 8,215
  • 28
  • 116
  • 256
0
votes
0 answers

Notify the AppBar from a nested child view flutter dart

I have a MainPage, which has an AppBar, a BottomNavigationBar, and multiple bodies : @override Widget build(BuildContext context) { return new Scaffold( appBar: resourcesBar(), body: _bodies[_selectedIndex], …
Mathieu
  • 1,435
  • 3
  • 16
  • 35
0
votes
1 answer

Stateful widget in listview and reloading leads to error

When I make a ListView with an array of stateless widgets I get no errors, everything works perfectly. However when I put Stateful widgets into the array and rerender the widget by scrolling it so it ends outside of the view then I get errors. I…
Nakruf
  • 17
  • 1
  • 5
0
votes
1 answer

Flutter: Only Re-render widget where setState() was called - in nested object structure

How Flutter renders the widgets has been described in detail here. It will compare the new with the old widget. Therefore, Flutter usually knows how to re-render the UI in most cases. In a nested object structure, all parent widgets inevitably…
0
votes
2 answers

Variable scope within the Flutter StatefulWidget

I'm trying to access the moviesList inside the build() and results as follows. What is the real issue? flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ flutter: The following…
Faisal
  • 1,332
  • 2
  • 13
  • 29
0
votes
1 answer

Updating a stateful widget variable after it has rendered?

I'm using a TabBarView with two tabs that each display a Stateful widget-- Let's call them the Main Widget and the Configuration Widget. The Configuration Widget serves as a 'configuration section' for the Main Widget-- I use it to set things like…
larryq
  • 15,713
  • 38
  • 121
  • 190