Questions tagged [flutter]

Use this tag for questions about the Flutter cross-platform UI toolkit. If your question is platform-specific, tag the platform as well (e.g., [android], [ios], etc.). You may also wish to include the [dart] tag for coding questions.

Flutter applications are written in the Dart programming language, and can connect to platform languages such as Java, Kotlin, Swift, and Objective-C. Also, thanks to ffi support, it is possible to interact with the C code directly . Flutter itself is built with C, C++, Dart, and Skia (a 2D rendering engine).

Flutter development is currently supported on Linux, macOS, Chrome OS and Windows operating systems.

Flutter is developed and maintained by Google and will be the main development SDK for Fuchsia, the expected and upcoming new Operating System also by Google.

Four main components of Flutter:

  • A heavily optimised, mobile-first 2D rendering engine (with excellent support for text) for 60fps apps
  • A functional-reactive framework so you can build customised UIs
  • A rich set of libraries and widgets (Material Design, Cupertino) widgets (optional, you can build-your-own widgets) so you can get started quickly and produce high-fidelity experiences
  • Productive CLI and IDE (IntelliJ) tools for sub-second developer cycles

Flutter is different than most other options for building mobile apps because Flutter uses neither WebView nor the OEM widgets that shipped with the device. Instead, Flutter uses its own high-performance rendering engine and framework to draw widgets to the screen.

Flutter also offers developers a highly productive and fast development experience, fast runtime and engine performance, and beautifully designed widgets that make for beautiful apps.


Resource


Source Code and Building


Community


Books

  • Flutter in Action - Complete Flutter and Dart resource, currently in 'Early Access'.

Related tags

168087 questions
387
votes
17 answers

How to add a ListView to a Column in Flutter?

I'm trying to construct a simple login page for my Flutter app. I've successfully built the TextFields and log in/Sign in buttons. I want to add a horizontal ListView. When I run the code my elements disappear, if I do it without the ListView,…
Charles Jr
  • 8,333
  • 15
  • 53
  • 74
383
votes
23 answers

Waiting for another flutter command to release the startup lock

When I run my flutter application it show Waiting for another flutter command to release the startup lock this messages and not proceed further.
Viren V Varasadiya
  • 25,492
  • 9
  • 45
  • 61
369
votes
34 answers

Dart SDK is not configured

I installed Flutter and set up Android Studio. Then I cloned an example of flutter on GitHub (https://github.com/flutter/flutter) and launched it in Android Studio, but it warns me "Dart SDK is not configured", this happened to my co-worker as well.…
Katelyn
  • 3,701
  • 2
  • 9
  • 6
368
votes
61 answers

Message "flutter run: No connected devices"

I am trying to create a sample application with Flutter (fresh installation). Android Studio is also installed (fresh installation). Here is the output of flutter run flutter run No connected devices. The output of flutter doctor: Doctor summary…
362
votes
19 answers

How do I supply an initial value to a text field?

I'd like to supply an initial value to a text field and redraw it with an empty value to clear the text. What's the best approach to do that with Flutter's APIs?
Seth Ladd
  • 112,095
  • 66
  • 196
  • 279
361
votes
25 answers

Flutter : How to change Android minSdkVersion in Flutter Project?

I was trying to start a flutter project for an App using Bluetooth to communicate. For that, I was using flutter blue. Unfortunately, when trying to run (on an Android device) the first example I created I was met with the following error: FAILURE:…
Maldus
  • 10,548
  • 4
  • 24
  • 36
356
votes
32 answers

How to use conditional statement within child attribute of a Flutter Widget (Center Widget)

So far whenever I needed to use a conditional statement within a Widget I have done the following (Using Center and Containers as simplified dummy examples): new Center( child: condition == true ? new Container() : new Container() ) Though when…
Marko
  • 4,857
  • 5
  • 17
  • 21
354
votes
16 answers

Scaffold.of() called with a context that does not contain a Scaffold

As you can see, my button is inside the Scaffold's body. But I get this exception: Scaffold.of() called with a context that does not contain a Scaffold. import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends…
Figen Güngör
  • 12,169
  • 14
  • 66
  • 108
343
votes
25 answers

Error:(1, 0) Plugin with id 'com.android.application' not found

This is my first attempt at Android Studio. I installed 0.8.0 and updated to 0.8.2. As soon as a project is created I get the error message: Error:(1, 0) Plugin with id 'com.android.application' not…
Bob Kusik
  • 3,439
  • 2
  • 12
  • 3
342
votes
8 answers

Passing data to StatefulWidget and accessing it in its state in Flutter

I have 2 screens in my Flutter app: a list of records and a screen for creating and editing records. If I pass an object to the second screen that means I am going to edit this and if I pass null it means that I am creating a new item. The editing…
moonvader
  • 19,761
  • 18
  • 67
  • 116
342
votes
17 answers

Sizing elements to percentage of screen width/height

Is there a simple (non-LayoutBuilder) way to size an element relative to screen size (width/height)? For example: how do I set the width of a CardView to be 65% of the screen width. It can't be done inside the build method (obviously) so it would…
Luke
  • 6,388
  • 3
  • 26
  • 35
331
votes
24 answers

Flutter: how to prevent device orientation changes and force portrait?

I would like to prevent my application from changing its orientation and force the layout to stick to "portrait". In the main.dart, I put: void main(){ SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, …
boeledi
  • 6,837
  • 10
  • 32
  • 42
328
votes
12 answers

flutter doctor --android-licenses gives a java error

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156) at…
Vivek Kogilathota
  • 3,301
  • 2
  • 6
  • 3
325
votes
27 answers

Vertical viewport was given unbounded height

This is my code: @override Widget build(BuildContext context) { return new Material( color: Colors.deepPurpleAccent, child: new Column( mainAxisAlignment: MainAxisAlignment.center, children:[new…
pallav bohara
  • 6,199
  • 6
  • 24
  • 45
323
votes
16 answers

Yellow lines under Text Widgets in Flutter?

The main app screen doesn't have this issue, all the texts show up as they should. However, in the new screen, all the text widget have some weird yellow line / double-line underneath. Any ideas on why this is happening?
dasfima
  • 4,841
  • 3
  • 21
  • 24