Newbie question related to Flutter StatefulWidget

I just started using Flutter, and was testing the sample counter app created with flutter create counter First thing I wanted to try, was to move th...

Value property doesnt update for dropdownfield when I do setState in flutter

I am updating the dropdown table dynamically from an API. When I select an hour, the corresponding subjects are retrieved from the API. Let's say I am switchin...

StreamBuilder on FireStore Document is refreshing widgets for which data is not changed

So I have a list of orders, which I am pulling from FireStore and showing on a page. Only the status part of the order is where I have used StreamBuilder to fetch the...

How to test a method in a Stateful Widget?

I'm learning how to test a method in a Stateful Widget. Now I'm concerned with unit testing. This is my code (I cut the useless part): <pre><code>class Counter ext...

Why setState in parent StatefulWidget do not update child StatefulWidget

I know, that correct way to update child StatefulWidget from parent StatefulWidget is to use child GlobalKey instance. But i cant understand, why setState(() {}...

Stateful Widget in Flutter

I am new to flutter and was studying with <code>StatefulWidget</code> but I couldn't clearly understand the following term <pre><code>class MyApp extends Stateful...

Getting error while passing key in stateful widget flutter

I'm trying to animate the width of AnimatedContainer. For this purpose i'm using a statefull widget in external file, here is code for this class <pre><code>class...

Flutter Unable to update List&lt;Map&lt;&gt;&gt; datatable onSelectChanged

Please help - and be patient i am still learning - I have a model with constant data (until I implement my API) that provides Order data <pre><code>class Orders {...

Passing Data to a Stateful Widget in Flutter

I'm wondering what the recommended way of passing data to a stateful widget, while creating it, is. The two styles I've seen are: <pre><code>class ServerI...

How to show local string in StatefulWidget?

I've learned How to use i18n via StatelessWidget for my flutter practice, but still not work via StatefulWidget. I can simply replace the following code ...

constructor doesnt work properly on flutter

I have create a class called Size <ul> <li>Class name: Size</li> </ul> enter code <pre><code>import 'package:flutter/material.dart'; import 'package:firstap...

Flutter: Strange animation combining bottomSheet and bottomNavigationBar and calling setState

Im having a Scaffold with a bottomSheet and a bottomNavigationBar in a stateful widget. Within the bottomSheet, i plan to add buttons, calling setState and triggering...

Do all widgets in Flutter have the bool this.mounted property?

Peace be upon you I am researching Flutter's widget lifecycle and stopped at a point which is the <code>this.mounted</code> boolean variable, it does exist dire...

How to call method of StatefulWidget from onPressed which is in Stateless class?

I´m learning flutter and as a first app I chose to make a calculator. I have got the layout set and now I need to do some work with data. The core of the problem is th...

Why is context safe to be used inside didChangeDependencies() method but not inside the initState() method?

<ol> <li>Both the <code>initState()</code> method and <code>didChangeDependencies()</code> are executed before the <code>build()</code> method of a state object, so wh...