Questions tagged [dart]

Dart is a class-based, statically(& strongly)-typed programming language for building web and mobile applications. Dart compiles to modern JavaScript to run in the browser and compiles to native code to run on mobile platforms like Android and iOS. Dart also runs on the command-line for scripting and server-side apps.

Dart is an open-source, class-based, statically(& strongly)-typed (with inference) programming language for building web and mobile applications created by Google. Although Dart is statically-typed it supports dynamic-typing through the 'dynamic' type.

Dart’s design goals are:

  • Create a structured yet flexible language.
  • Make Dart feel familiar and natural to programmers and thus easy to learn.
  • Ensure that Dart delivers high performance on modern web browsers, mobile, and environments ranging from small handheld devices to server-side execution.

Dart targets a wide range of development scenarios, from a one-person project without much structure to a large-scale project needing formal types in the code to state programmer intent.

To support this wide range of projects, Dart provides the following features and tools:

  • Sound type system: A type system which feels lightweight thanks to inference and gives good safety
  • Mobile and Web frameworks: Dart developers can use Flutter on mobile and AngularDart on the web
  • IDE Integration: official plugins for Jetbrains' IDEs (IntelliJ IDEA / WebStorm etc) and Visual Studio Code. Community plugins also exist for many other editors backed by the Dart Analysis Server




Chat Room

90488 questions
34 answers

How do I use hexadecimal color strings in Flutter?

How do I convert a hexadecimal color string like #b74093 to a Color in Flutter? I want to use a HEX color code in Dart.
  • 114,516
  • 58
  • 291
  • 402
37 answers

Create a rounded button / button with border-radius in Flutter

I'm currently developing an Android app in Flutter. How can I add a rounded button?
Kingsley CA
  • 10,685
  • 10
  • 26
  • 39
14 answers

How to change the application launcher icon on Flutter?

When I create an app with a flutter create command, the flutter logo is used as an application icon for both platforms. If I want to change the app icon, shall I go to both platforms directories and replace images there?, by platforms directories I…
  • 8,744
  • 4
  • 30
  • 49
18 answers

How can I add a border to a widget in Flutter?

I'm using Flutter and I'd like to add a border to a widget (in this case, a Text widget). I tried TextStyle and Text, but I didn't see how to add a border.
Seth Ladd
  • 112,095
  • 66
  • 196
  • 279
27 answers

How do you build a Singleton in Dart?

The singleton pattern ensures only one instance of a class is ever created. How do I build this in Dart?
Seth Ladd
  • 112,095
  • 66
  • 196
  • 279
34 answers

How to change package name in flutter?

Is there any way to change Package Name of Flutter project? I want to change package name and application name in flutter project.
Abc Xyz
  • 5,907
  • 5
  • 11
  • 7
17 answers

What is the difference between the "const" and "final" keywords in Dart?

What is the difference between the const and final keywords in Dart?
Ishmal Ijaz
  • 5,317
  • 3
  • 11
  • 17
31 answers

How can I dismiss the on screen keyboard?

I am collecting user input with a TextFormField and when the user presses a FloatingActionButton indicating they are done, I want to dismiss the on screen keyboard. How do I make the keyboard go away automatically? import…
Collin Jackson
  • 110,240
  • 31
  • 221
  • 152
28 answers

No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase

I am building a Flutter application and I have integrated Firebase, but I keep getting this error when I click on a button either to register, login, or logout. I have seen other people have asked the same question, but none seems to work for me. I…
Kennedy Owusu
  • 5,690
  • 4
  • 15
  • 20
20 answers

How do you detect the host platform from Dart code?

For UI that should differ slightly on iOS and Android, i.e. on different platforms, there must be a way to detect which one the app is running on, but I couldn't find it in the docs. What is it?
  • 6,495
  • 3
  • 21
  • 22
24 answers

Flutter - Wrap text on overflow, like insert ellipsis or fade

I'm trying to create a line in which center text has a maximum size, and if the text content is too large, it fits in size. I insert the TextOverflow.ellipsis property to shorten the text and inserting the triple points ... but it is not…
  • 12,422
  • 28
  • 62
  • 86
27 answers

How to create number input field in Flutter?

I'm unable to find a way to create an input field in Flutter that would open up a numeric keyboard and should take numeric input only. Is this possible with Flutter material widgets? Some GitHub discussions seem to indicate this is a supported…
Janne Annala
  • 25,928
  • 8
  • 31
  • 41
19 answers

How can I change the app display name build with Flutter?

I have created the app using Flutter create testapp. Now, I want to change the app name from "testapp" to "My Trips Tracker". How can I do that? I have tried changing from the AndroidManifest.xml, and it got changed, but is there a way that Flutter…
  • 4,362
  • 2
  • 14
  • 14
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
34 answers

Dart SDK is not configured

I installed Flutter and set up Android Studio. Then I cloned an example of flutter on GitHub ( and launched it in Android Studio, but it warns me "Dart SDK is not configured", this happened to my co-worker as well.…
  • 3,701
  • 2
  • 9
  • 6
2 3
99 100