Most voted "flutter" questions
Flutter is a mobile application development SDK created by Google.
Learn more…510 questions
Sort by count of
-
8
votes1
answer775
viewsHow to have multiple languages in a single application?
Listening to a technology podcast on Nubank, CTO and Principal Engineer comment that they use Java, Kotlin, React Native and Flutter to develop the Android app and everything generates a single…
android react-native software-architecture kotlin flutterasked 5 years, 6 months ago Alisson Marqui 1,128 -
5
votes2
answers389
viewsWhat is the function of the keys { } in this interpolation?
class MyStateFull extends StatefulWidget{ MyStateFull(this.nome); final String nome = 'Maria'; @override _ContadorClique createState() => _ContadorClique(); // @override //…
-
5
votes1
answer2535
viewsHow to keep Appbar and Bottomnavigationbar between pages
I’d like some help from you guys on an app in Flutter. I’m creating the routes named to navigate between the App pages. However, I was unable to maintain Appbar and Bottomnavigationbar during…
flutterasked 5 years, 4 months ago Joao Barbosa 366 -
5
votes1
answer351
viewsSecondary thread on flutter
Hello, I have the following problem in flutter: I currently have an application with the plugin flutter_background_geolocation based on the example that is provided by the plugin. While performing…
-
4
votes1
answer73
viewsHow do for the child widget of a Column expands to the maximum width of the parent(Column)?
Form( child: Column( children: <Widget>[ CustomTextFormField("E-mail"), CustomTextFormField('Senha'), Expanded( child: FittedBox( fit: BoxFit.fitWidth, child: RaisedButton( onPressed: () {},…
-
4
votes2
answers7739
viewsFlutter - Change internationalization of date names
I am new to Flutter and I would like to know if it is possible to automatically translate the names of the days of the week, months, etc ... encompassing every application?
-
4
votes1
answer805
viewsHow can the use of 'const' constructors improve performance in Flutter?
In the documentation one of the recommendations to improve the performance of applications in Flutter says: Use constant widgets whenever possible and provide a const constructor... How to…
-
4
votes2
answers529
viewsFlutter - How to pass Firestore ID list to a Futurebuilder?
I’m developing a book app and need help uploading the user’s favorite book list. I don’t know the way I’m doing it would be the right one, I’m saving the Ids of all the books that the favorite user…
-
4
votes3
answers3057
viewsCurrent location - Flutter
Guys, I need to get the current latitude and longitude of the cell phone coom flutter, but it’s not working and I’m not finding anything on the internet, someone can help me? code: import…
-
4
votes2
answers290
viewsHow to search whether a string array contains in another string array. Using complete and incomplete words
How to search in an array of strings using complete and incomplete orders, similar to what the phonebook does. Example: List array1 = ['Escola','Estadual','José','da','silva']; Lista busca =…
-
3
votes3
answers3112
viewsHow to change the border color of a Textformfield?
I would like to change the color of the Textformfield border on the login screen to white, because the background is gradient and it would be easier to view the text. Today I’m using the pattern I…
-
3
votes3
answers2619
viewsVscode + GIT + Flutter Configuration
Sirs, I am starting the studies in Flutter, I did the installation of Flutter, Dart, GIT and Vscode, when I will start the development Vscode returns me the following error: [undefined] flutter…
-
3
votes2
answers546
viewsDifference between ways to import with and without 'package:'
When we import a class/library two options are suggested, I wonder if there is any difference/advantage between importing classes/libs directly informing the path and with the 'command' package: Ex:…
-
3
votes1
answer722
viewsSetstate Flutter
Good afternoon. I’m starting with flutter (I came from Reactnative), watching some courses... and I got the question: What does setState really control? In Reactnative he looks at everything we set…
-
3
votes1
answer410
viewsIs it possible to list the name of the Assets in a Flutter app?
I need to know which ones Assets I uploaded it to an flutter, to reflect and make a decision. I know I can list which ones Assets that I wish to climb into the app through the pubspec.yaml: ...…
flutterasked 5 years, 5 months ago Jefferson Quesado 22,370 -
3
votes1
answer819
viewsHow to get the uid of the currentUser in the firebase in flutter?
After the splashscreen I check if the currentUser is null. If it’s not I redirect it to my home. The problem is that this user’s UID is null. I wonder how do I get this UID from currentUser. I used…
-
3
votes0
answers59
viewsWhat is the best way to read a json in flutter?
I’m entering the world of development and learning Flutter to program for mobiles. The basic operation of my app will be to read a JSON from my server and play on a list in the app. Doubts: What are…
-
3
votes2
answers235
viewsHow to run all my tests at once?
How to run all unit tests at once on the flutter? Each test has only the option Run as in the image: So I’d like to know how to run all my tests at once without having to click each one.…
-
3
votes1
answer326
viewsBest Practices for Creating Widgets
I know two ways to create widgets, extending StatelessWidget class MeuWidget extends StatelessWidget { const MeuWidget({Key key}) : super(key: key); @override Widget build(BuildContext context) {…
-
3
votes1
answer1163
viewsNavigation with named routes
I am trying to create some routes named in flutter. When clicking on a floating button, I should direct myself to a screen called new_flight.Dart however, I am seeing an exception: I/flutter (…
-
3
votes0
answers388
viewsNon-nullable instance field '_Description' must be initialized
"Non-nullable instance field '_Description' must be initialized." As of version 2.12.0, Flutter always displays messages like this, how to solve this problem without downloading the version?…
-
3
votes2
answers244
viewsWhich package should the "@required" annotation be imported from?
I need to put the note @required in a builder: class Pacote { final int id; final int nCodigos; final String tabela; Pacote({@required this.id, @required this.nCodigos, @required this.tabela}); //…
-
3
votes1
answer1251
viewsHow to use the Assert statement?
To Documenting informs that: During development, use a statement assert for interrupt normal execution if a condition is false. The instruction assert ensures, for example, the manipulation of…
-
3
votes2
answers77
viewsProblem using Mobx and Observerlist
Hello, good afternoon! I am trying to make a checkbox list (Checkboxlisttile) using mobx, however, whenever I click on the box to mark or deselect I have to use the flutter Reload or setState to…
flutterasked 3 years, 11 months ago Alex Anderson 23 -
2
votes0
answers109
viewsFirebase cloud messages does not send messages to all devices using the app
I implemented the cloud messaging of Firebase using flutter and so far so good, I tested the sending of push notifications to an emulator of an android and it worked fine, the notification arrived…
-
2
votes1
answer4714
viewsHow do I calculate Widgets size for different resolutions?
For example, I have the following SizedBox: SizedBox( width: 40, height: 40 ) The value 40 is a fixed size defined by the prototype in baseline resolution (1x). I want these values updated for when…
flutterasked 5 years, 7 months ago Marcus Hert da Coregio 399 -
2
votes2
answers1593
viewsProblem when installing Flutter
when typing the command flutter doctorcmd displays the following error: Error: The Flutter directory is not a clone of the Github project. The flutter tool requires Git in order to Operate properly;…
-
2
votes1
answer1848
viewsConvert String to MD5 with Flutter
I have an application in Flutter,and I’m trying to convert my Password to MD5 on the login screen, I found some other methods but none served me. I’m trying to use final md5 = new MD5._() to convert…
-
2
votes2
answers815
viewsDo you have a plugin for VS Code that shows the color on the side?
I am programming in Dart/ Flutter and would like to find a plugin that does the same as Android Studio, recognizing the color typed and showing on the side The written colors are a little different…
-
2
votes1
answer2045
viewsHow can I resolve error "The argument type 'String' can’t be Assigned to the Parameter type 'List<int>' " - Flutter
I’m trying to fetch an API Token using Flutter, but this code: var _random = Random.secure(); var random = List<int>.generate(32, (i) => _random.nextInt(256)); var verificador =…
-
2
votes2
answers1192
viewsHow to open the link by clicking on a Gridview image and placing the name below it?
Good morning! I’m starting to learn programming with flutter, I’m very new in the field. I want to know how to open the link of a site, when clicked on a certain image that is in the flutter…
-
2
votes1
answer110
viewsFill items from a Dropdownbutton with a Json value
I have a field DropDownMenu and would like to fill in the Items of it with the values of my Json. I have this code: String _mySelection; List<Map> _myJson =…
-
2
votes0
answers141
viewsSign flutter project with the same Keystore as an already published project
I have a question I have an application made in Kotlin in android studio already published in the store but I discovered the flutter and I like to use it more as language, I was thinking of redoing…
-
2
votes1
answer274
viewsFlutter Desktop change title, position and size of main window
Currently when running a desktop application the window size and title come predefined, how to change this information? As an example, we used the standard test project provided in git: flutter…
flutterasked 4 years, 10 months ago rubStackOverflow 7,372 -
2
votes1
answer134
viewsWhat is the Function and Utility of "context" in "Widget build(Buildcontext)"
I see in many examples that context is used only with parameters for other functions. In other cases to get some property from widget father. After all, what role and best example illustrates good…
flutterasked 4 years, 10 months ago rubStackOverflow 7,372 -
2
votes1
answer239
viewsLogin with google does not work in apk release Flutter
In debug mode, login works normally, I’ve already configured SHA1 and also added Internet permission, in debug mode it works normally, but when I Gero the final apk, it doesn’t work (opens the panel…
-
2
votes1
answer482
viewsTaking specific data from a "(Response.body)"
I have that code: class _EstabelecimentosPageState extends State<EstabelecimentosPage> { final String url = codeUrl; @override void initState() { super.initState(); this.getJsonData(); }…
-
2
votes1
answer193
viewsWhat’s the difference between Dynamic and Object
What’s the difference between using Dynamic and Object on Dart? For example, functions that do not know the type of return: Future<dynamic> getQuery ou Future<Object> getQuery To make…
-
2
votes1
answer2254
viewsFlutter - How to perform a search in a listview?
Hello! I found many tutorials on the internet, but I could not implement any successfully. Most of these tutorials, work with the creation of 2 lists, an initial and a secondary to be manipulated.…
-
2
votes1
answer455
viewsFlutter does not return images from api
I’m trying to get the images from mongodb database, via api I did in nodejs, but it doesn’t work at all, and still presents this error here. Invalid argument(s): No host specified in URI…
-
2
votes2
answers785
views -
2
votes0
answers37
viewsBottomexpandableappbar Fluttter how to make it work
Guys good night, I’m having problem that I can not solve, I’m trying to add an expansive menu bar at the bottom of the screen and is not appearing when I run the code import 'dart:async'; import…
-
2
votes1
answer143
viewsError while running Dart list
I am trying to make a list in Dart/flutter, however I am getting the following error while running the app screen. Repository class: chamarGetGaiola(String usuario, String token) async {…
-
2
votes1
answer101
viewsHow to enable Null-Safety on Flutter without breaking the project?
How to enable Null-Safety in Flutter without running the risk of breaking the project? I saw many reports of people that when enabling appear compatibility problems in certain libraries.…
-
2
votes1
answer595
viewsTouch effect (touch ripples) on long touches, with Inkwell
We can create a button with a Container, so leave it as we wish. My doubt, is in the touch effect with the InkWell, that a color is added to the Container, the same "stops working" as in the…
-
2
votes2
answers1700
viewsHow to prevent the user from returning to the login screen after logging into the flutter?
I have the following login widget that after the request is successfully made, it adds on the navigation stack to the home screen and removes the login screen. If I try to get back from home screen…
-
2
votes1
answer101
viewsObject Orientation - Flutter
I have an application in flutter that has a form and that the data is sent to a class, however, I have a specific screen that needs to recover a class data in which I sent, but when I recover the…
-
2
votes2
answers236
viewsHow to change the language of the Flutter Image Picker plugin?
I would like to change the language of the text that is displayed in the library image_picker, i would like to leave this text translated into the user’s mobile language. If the image of how it is…
-
2
votes2
answers221
viewsStatelesswidget Only State Management (no Statefulwidget or external libs)
Is there any way of a StatelessWidget have or simulate a state control? To not be without context, let’s take as a basis the standard example of flutter: import 'package:flutter/material.dart'; void…
-
2
votes0
answers182
viewsAccessing sub-collection in snapshot.data
Hello, I build one ListView with a FutureBuilder. But I need to access a sub-collection, then a document and get a field from the document. But returns null, how do I do that? For example: To get…