This question’s answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions. Apparently, none of the Flutter commands...
I have one StatefulWidget in Flutter with button, which navigates me to another StatefulWidget using Navigator.push(). On second widget I’m changing global state (some user preferences). When I get...
I like to simulate an asynchronous web service call in my Dart application for testing. To simulate the randomness of these mock calls responding (possibly out of order) I’d...
I’ve used both Expanded and Flexible widgets and they both seem to work the same. What is the difference between Expanded and Flexible? 8 Answers 8
How can I change the color of CircularProgressIndicator? The value of the color is an instance of Animation<Color>, but I am hoping there is a simpler way to change...
I have a network call to be executed. But before doing that I need to check whether the device have internet connectivity. This is what i have done so...
I’m looking for a way to execute code in Flutter when the app is in Debug mode. Is that possible in Flutter? I can’t seem to find it anywhere...
I have a Column widget with two TextField widgets as children and I want to have some space between both of them. I already tried mainAxisAlignment: MainAxisAlignment.spaceAround, but the...
I am trying to display the current DateTime in a Text widget after tapping on a button. The following works, but I’d like to change the format. Current approach...
class MyHome extends StatefulWidget { @override State<StatefulWidget> createState() => new MyHomePage2(); } class MyHomePage2 extends State<MyHome> { List items = new List(); buildlist(String s) { setState(() { print("entered buildlist"...