Questions tagged [statefulwidget]

339 questions
0
votes
1 answer

Method is not defined in other class

Because I want to call the setState Method in the class "EditProfilePage", I had to change it to a statefulWidget: class EditProfilePage extends StatefulWidget { @override _EditProfilePageState createState() =>…
Martin Seubert
  • 978
  • 3
  • 21
  • 37
0
votes
2 answers

Why does a stateful widget build itself using a build method in the state class

I'm just learning flutter - I build a few basic tutorials and am now trying to build a simple notepad application. https://github.com/sketchbuch/examples_flutter/blob/master/notes/lib/src/components/notepad/notepad.dart In this file I have a…
Arnold Rimmer
  • 2,723
  • 2
  • 16
  • 23
0
votes
0 answers

Deeper understanding: Stateful widget is always rebuilt even though I am in different view?

Issue: GroupsOverview (which uses Futurebuilder - code is very long and not displayed here) seems to keep rebuilding when clicking through other views (as well as 'subviews') in the app which leads to too many Algolia operations. I think it's an…
user3532201
  • 579
  • 1
  • 9
  • 23
0
votes
1 answer

TextField click changes Switch in flutter

As soon as a TextField gets focused, an object which stores if it's enabled changes so that the TextField gets disabled immediately. This also happens when another TextField above gets focused. The TextField is placed inside a StatefulWidget and a…
eli2003
  • 400
  • 5
  • 13
0
votes
1 answer

What are the internal implementations of Navigator.push() and Navigator.pop()?

In a State class, despite not calling setState() call, it is rebuilt with new items when the widget is returned from Navigator.pop(). How could this happen? On my simplified code below, the ListView is rebuilt whenever I clicked a button and pop…
wurikiji
  • 327
  • 3
  • 12
0
votes
0 answers

Expose data from stateful widget? flutter

I have a Tinderlike card deck. I'm trying to get the front card of the deck from outside the Tinderlike widget (Stateful). When I try to expose his state using controlling state from outside of a StatefulWidget I always get a null. My TinderLike…
user2953680
  • 564
  • 1
  • 5
  • 16
0
votes
1 answer

How to deal with a stateful widget as a child for grid.tile

I am new to flutter. and I am trying to make an x o game. I am still on the very first steps of the app. I am using gridview.count to make the layout of the game. The problem is the properties of the stateful widget(choice, onTap()) is not defined…
Mee
  • 1,413
  • 5
  • 24
  • 40
0
votes
1 answer

How to change the state of the checkbox in the drop-down list?

I study flutter and make a simple application with a drop-down list and checkboxes, as shown in the picture. But it is not possible to achieve a change in the status of checkboxes. Many different options reviewed, I did following the example. Most…
Вячеслав
  • 707
  • 1
  • 12
  • 21
-1
votes
1 answer

Using optional parameters with a stateful widget class in flutter

Hi I am trying to create a stateful widget that accepts some required arguements and some optional ones. The optional ones will have a set default value if nothing has been passed. I have applied the same process as you would for achieving this in a…
RishV
  • 17
  • 3
-1
votes
1 answer

How setState call build in flutter?

I know build will be called everytime setState called and I want to find the method chain in the flutter framework. So I check the source code of flutter and find some steps of setState: _element!.markNeedsBuild() mark state's element dirty. …
无夜之星辰
  • 5,426
  • 4
  • 25
  • 48
-1
votes
1 answer

How to pass data to a miniplayerand show the currently playing song in a spotify clone app

Basically I want to display a miniplayer whenever a Gridtile is pressed and the details on it should match the tile which was pressed. class SongJBI extends StatefulWidget { @override State createState() => SongJBIState(); } class…
-1
votes
1 answer

Flutter Overriding stateful widget

I have a situation where I want to create multiple flutter StatefulWidgets based on the same state class. The problem I run into seems clear, the state widget needs to know the properties of the parent that calls createState. There has to be a way…
Nefarious
  • 458
  • 6
  • 21
-1
votes
1 answer

Trying to change text whilst user cursors flutter

I am making a crypto app which gets live crypto data, and puts it into a graph. Once a user toggles on the graph, a variable catches the value, and I try to update the price text to resemble the value. So the text below "Bitcoin" which on the image…
-1
votes
2 answers

How to pass data from Singleton to Stateful Widget class?

I have a class Communicator which where I've declared a few functions. Executing those function takes some time and an update of progress is required till all the functions get executed. Now, I am using the functions of class Communicator in my…
vibu
  • 77
  • 1
  • 8
-1
votes
1 answer

Dart persist data across pages

For a quiz app, I want to award points to various variables. At the end, the variable with the most points should be displayed. The quiz has a total of 6 pages and each question can be answered with yes or no. I have already tried to set the…
1 2 3
22
23