Skip to main content
Filter by
Sorted by
Tagged with
657 votes
33 answers
691k views

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.
creativecreatorormaybenot's user avatar
595 votes
41 answers
846k views

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's user avatar
  • 11.4k
591 votes
18 answers
664k views

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 ...
RobertoAllende's user avatar
580 votes
24 answers
1.1m views

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's user avatar
  • 119k
524 votes
32 answers
316k views

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's user avatar
  • 119k
521 votes
36 answers
533k views

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's user avatar
  • 6,467
516 votes
35 answers
397k views

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 ...
Collin Jackson's user avatar
512 votes
17 answers
207k views

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's user avatar
  • 5,657
500 votes
28 answers
448k views

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 ...
Kennedy Owusu's user avatar
498 votes
23 answers
313k views

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?
Gavin's user avatar
  • 7,173
476 votes
25 answers
582k views

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 ...
rafaelcb21's user avatar
  • 13.2k
444 votes
20 answers
414k views

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 ...
rajaishwary's user avatar
  • 4,942
433 votes
28 answers
539k views

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 ...
Janne Annala's user avatar
  • 28.1k
421 votes
20 answers
295k views

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 ...
Charles Jr's user avatar
  • 9,009
421 votes
37 answers
512k views

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 ...
Katelyn's user avatar
  • 4,221

15 30 50 per page
1
2 3 4 5
6401