Most voted "dart" questions
Dart is a web-based language developed by Google. The goal of the Dart language is to replace Javascript as the main language of browsers. Programs in this language can be either run on a virtual machine or compiled for Javascript.
Learn more…410 questions
Sort by count of
-
0
votes1
answer204
viewsHow to define Dart parameter
class Checkbox extends StatelessWidget { final String title = 'Checkbox'; // final String value ='CheckboxValue'; @override Widget build(BuildContext context)…
-
0
votes2
answers70
viewsDo codes in the console debug have any meaning?
I would like to know if there is any documentation that explains in more detail what that means I/flutter,etc, and the code in parentheses. Sometimes it goes unnoticed in debug exception and on the…
-
0
votes1
answer246
viewsHow do I know if my development environment is compatible with Androidx?
My project was created long ago and I don’t know if it is compatible with Androidx how could I identify it? And how to upgrade to make it compatible with Androidx? (I am using vscode)
-
0
votes1
answer83
viewsFlow of change notification
I have already understood how the process of changing the state of a widget where it is 'updated' to show its new value. However, the documentation speaks of the flow, that is, the path that is…
-
0
votes3
answers860
viewsDeserializar json vector in Dart/Flutter
I’m trying to deserialize this json vector [{"i":737,"n":1}] but I’m not getting the variables "i" and "n". Class to deserialize class PortasAbertas { int i; int n; PortasAbertas({this.i, this.n});…
-
0
votes2
answers2045
viewsFlutter - How do I change the color of the Expanded only clicked. Thank you?
Row( children: lists .map((element) => Expanded( child: new GestureDetector( onTap: () { print("Container clicked"); setState(() { _doop = element; …
-
0
votes1
answer463
viewsRedirect via button to website - Flutter
You can redirect the user after clicking a button to a website, directly opening the browser or even a webview. From onPressed. Container( alignment: Alignment.center, child: FlatButton( onPressed:…
-
0
votes0
answers24
viewsHow to discover possible Exceptions?
Example, in http requests we can have SocketException, TimeoutException,etc. In I/O operations we also have other possible Exceptions. Not to have to treat in a generic way, ex: catch (e), how to…
-
0
votes1
answer548
viewsDart/Flutter verification/validation in the Firebase Firestore database
I’m trying to do a Dart/Flutter check/validation in the Firebase Firestore database to not save the same serial number string twice in the database, but I’m doing something wrong because it keeps…
-
0
votes2
answers55
viewserror in update flutter + firebase method
Good afternoon! I’ve got an item error repo.senha and repo.nome. void atualizar(Repositor repo) async { var update = Map<String, String>(); update.putIfAbsent("senha", repo.senha);…
-
0
votes1
answer409
viewsError when converting json with object lists to a Dart object
Good morning to you all! I am getting the following error while trying to convert a json to Dart. [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: type '_Internallinkedhashmap' is…
-
0
votes2
answers65
viewsHow to make a filter with != or Isnotiqualto in the Firestore?
Hello! I need to make an appointment with filter on firestore but I read in the documentation that they do not have "!=" or "Isnotiqualto" to create a restriction. I wanted to do something like:…
-
0
votes0
answers579
viewsError: Unhandled Exception: type '_Internallinkedhashmap<String, Dynamic>' is not a subtype of type 'int' in Flutter
Hey, how you doing? I am still learning flutter and am having a problem authenticating the user. Even if I receive the status 200, I cannot navigate to the authorized page. I wonder if someone could…
-
0
votes1
answer241
viewsHow to make only the user who saved the String can see Flutter/Firebase?
This is a code that saves a String qr code that does not repeat in the database, but this way everyone can access this data. I already got the user ID but I still can’t filter to just see the list.…
-
0
votes2
answers4378
viewsPositioning in flutter columns
I have the following code on the flutter: import 'package:flutter/material.dart'; class LoginPage extends StatefulWidget { @override _LoginPageState createState() => _LoginPageState(); } class…
-
0
votes1
answer186
viewsInsert Image after Gridview
I’m developing an APP on flutter using a Staggeredgridview at the beginning of the build, but I’m not able to insert an image before this grid. import 'package:flutter/material.dart'; import…
-
0
votes2
answers448
viewsHow to remove back arrow from home screen (flutter)?
People I’m having a problem the moment I logout type, I press the icon to logout it leaves the app, only when soon again it presents an arrow back on the home screen. my code is like this:…
-
0
votes0
answers56
viewsHow to List Several Formulars in FLUTTER Within a Card
I’m trying to list the information inside the forms in a single Card, but I can’t because the Card has only one property title and a subtitle. My Code : @override Widget build(BuildContext context)…
-
0
votes1
answer445
viewsListview.Uilder does not update when removing an item from the list, but when adding yes
I have a Future Builder that takes a list, and then returns a column with a Listview.Builder() and a button below, when using the button to add an element the list updates successfully, now when…
-
0
votes0
answers31
viewsFirebase: Rename events
I received from my company the work of implementing Firebase in our flutter app, studied firebase and found the Events page of Firebase Analytics, and saw that the events already "came with…
-
0
votes0
answers159
viewsText widget displays only 1 character
I’m starting flutter now, and in my first App (which should display random phrases as you press a button) it’s giving a problem, rather than displaying sentences, it displays only a single…
-
0
votes0
answers191
viewsDart in vscode presents problem in execution
When I made a simple code in the Dart language to print in "hello world" always appears this problem, someone knows how to solve? PS C: Users 55869 Desktop Dart Newproject myapp> Dart run lib…
-
0
votes2
answers998
viewsHTTP Flutter request sending xml data to body
I would like help processing an HTTP request in Flutter (in this case using the SEARCH method to filter files on a Webdav (Nextcloud) file server where I need to send XML type data in the request…
-
0
votes0
answers36
viewsRangeerror (index): Invalid value: Valid value range is Empty: 0
People I am trying to return data from my api in the application and I am using Getx to manage the state, but in my View I am having the error Rangeerror (index): Invalid value: Valid value range is…
-
0
votes1
answer1150
viewsHow to display async sqlite query inside a Widget in Flutter
Good morning! I have an application with sqlite. The idea is to take the value entered by the user and display on the homepage through sum. I can display the value correctly by android studio…
-
0
votes1
answer41
viewsTake only values after the comma in a double
What is the best way in Dart to pick up the value after the comma/point in a double? Ex: double x = 21.16; How do I get only 16? How do I get only 21? I’m using the x.truncate();.…
-
0
votes0
answers53
viewsCannot find declaration to go to - Flutter Update
Hello, I updated the flutter recently, and now the project does not want to run... I believe it is something of the new update... That’s the mistake down there. Version:…
-
0
votes0
answers30
viewsHow to recover a list?
hello, I’m making a screen where the user can add new words, edit them and delete them and also can search the words they added. However I want the list of words that the user made appears on the…
-
0
votes0
answers35
viewsFlutter: Execution failed for task ':app:compileReleaseJavaWithJavac'
I’m trying to build an android app on Flutter and it returns me this error. I already updated the SDK, already checked the environment variables and nothing. Someone knows what I can do?…
-
0
votes1
answer1226
viewsReturn a list of flutter cards
I’m trying to return a list of cards according to the data I have in the database. For example, if I have three documents in the bank, then the application has to create three cards, and so on. The…
-
0
votes1
answer30
viewsFlutter Certificate
I’m having error to query an api, because it is with error in the certificate I wanted to know if anyone has any idea what can be already tried several ways and nothing.…
-
0
votes0
answers17
viewsDoubt about Flutter editor using VS code
Does anyone know which command to use in Settings or which editor to use for Dart/flutter so that it does not delete blank lines when using save or shortcut to auto configure code? thank you…
-
0
votes1
answer49
viewsPassing the attribute of a list element as a method parameter
There is the possibility to pass the attribute of an element/object of a list as a function parameter and use it to return the values? static Future<List<dynamic>> filterElementsInList(…
dartasked 3 years, 3 months ago GILBERTO OLIVEIRA 68 -
0
votes0
answers1152
viewsInstantiating a method in another class
I am instantiating a method of another class, in which it uses a list filled by initState, but when entering the method I am calling, the list comes empty, as if it had not been executed, I’m…
-
0
votes1
answer24
viewsDoes Intl-Dart numberformat parse wrong of a dot number in pt_BR?
I’m using the package lntl Dart to parse decimal numbers. When setting the locale to 'pt_BR', I would expect a number in English format (1.5 instead of 1.5) to release a Formatexception. But he does…
dartasked 3 years, 3 months ago Luis Fernando Trivelatto 111 -
0
votes1
answer205
viewsPopular Dropdown with api
Hello, I am trying to recover the json data from a URL, I am following this tutorial https://inducesmile.com/google-flutter/how-to-populate-dropdownbutton-using-json-api-in-flutter/ I was able to…
-
0
votes0
answers24
viewshow to resolve this error? (The argument type 'double' can’t be Assigned to the Parameter type 'int')
if (result & 1 == 1) { result = ~result; } var result1 = (result >> 1) * 0.00001; lList.add(result1); } while (index < len); the project is in . Dart in flutter error: "The argument…
-
0
votes1
answer1139
viewsHow to use profile image in flutter?
I have a card represented by showing the user photo + its name, when I search for a local image it loads the image normally, but when I need to load this image through a link of my api it does not…
-
0
votes1
answer615
viewsCRUD in flutter
I have a doubt, I know what the problem is but I have no idea how to solve. In a crud I have a parameter idade which is int (defined as INTEGER in the bank) and I can not register in the bank but if…
-
0
votes1
answer2975
viewsFlutter passing data between screens
I have a doubt that I believe to be simple but as I have never done so I am struggling. I want to pass the data of a contact to another screen of the app. Where I call an Actionsheet that appears…
-
0
votes2
answers157
viewsPre-inserted text from the database
In my app it would be interesting this text come from the bank not in formed of placeholder but in a text where he could change only a comma if he wanted, but I can’t find a way to do that because…
-
0
votes0
answers357
viewsFlutter - Vertical Menu inside a bottomNavigaationBar
I’m wearing a bottomNavigationBar in my App and the navigation is working perfectly, however, in one of the items(pages) I need to have another menu in the vertical position(columns) and when…
-
0
votes1
answer2178
viewsHow to resolve "the getter data was called on null"?
Personal talk! I’m trying to create a function changeLikes where my firebase document (snapshot) has its likes incremented by Firebase by clicking on ontap through the FieldValue. However, I am…
-
0
votes1
answer403
viewsOverlay Widgets - Flutter
When I activate the Navigator.pushReplacement( context, CupertinoPageRoute( builder: (context) => ContactFound(key, index, model))); This screen is under a menu (Instagram style). I wonder if you…
-
0
votes1
answer1107
viewsDecimal Flutter
Gentlemen, good night! I have a problem in my calculation because it is coming out broken values, Ex: 13,3434 I would like you to leave only 13,34. Follow the code for better viewing. Future…
-
0
votes1
answer86
viewsHow do I getter my request in flutter?
I have a function that performs login and I need to save the token on storage: login() async { setState(() { isLoading = true; }); final response = await http.post('https://xxx.net/api/login', body:…
-
0
votes1
answer2743
viewsFlutter: type 'Future<Dynamic>' is not a subtype of type widget
I’m trying to run a check through the token: If there is a token, display the page Home and, if not, displays the page Login. I tried this way: main.Dart: class MyApp extends StatelessWidget { //…
-
0
votes1
answer509
viewsList of flutter images
In my flutter app I want to display images, and these images will be grouped by categories/albums. These images are brought in the form of an array, in this format: This is my current function to…
-
0
votes1
answer278
viewsProblem when returning from a Custonalertdialog - Flutter
I have a Custonalertdialog that saves information in the bank, for this, by clicking the SEND button I use a await. The information is saved in the database successfully, but the application hangs…
-
0
votes0
answers322
viewsUnhandled Exception: Rangeerror (index): Index out of range: index should be Less than
I’m having a problem trying to save a pdf using the "pdf_dart" library. I assume the problem is linked to the image I’m downloading from the internet to try to attach to the pdf but I’m not sure…