Category "dart"

Convert List <double> to Double

I want to convert the double type of list into a double variable, my code is something like this... var _first=<double> [108,105,90.833,87.7,88.6]; v

How to parse over different elements in a HTML document (in Dart/Flutter) and keep the order intact

I have a large HTML document containing important information of different types in sequence. I'm parsing in Dart/Flutter Obtaining the raw information is fine

TextField inside of Row causes layout exception: Unable to calculate size

I’m getting a rendering exception that I don’t understand how to fix. I’m attempting to create a column that has 3 rows. Row [Image] Row [T

Flutter error, Null check operator used on a null value

Whenever I tried to do register and tap on the register button then I am having this type of problem with the null check operator used on null values. I get thi

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'

Mockito generate an invalid override for Methods that have as parameter an other generated class (generated from Moor)

We generate our database entities with moor. We have an database service as an facade for all database access. There we have the method Future<DatabaseEntry?

I want to build a dynamic Tab Bar and corresponding pages which contains a list of items corresponding to that tab using complex JSON data in flutter

I'm trying to build a dynamic Tab bar using flutter that displays tabs with the tab names corresponding to my JSON data and then for each key I want to map the

Flutter: Play sound on button press

I'm very new to programing and especially flutter. I want to write an soundboard, basically a list of buttons and the job of each button is to play a sound that

How to make a phone call from a flutter app

I try to make a phone call from my Flutter app. With the following code: UrlLauncher.launch('tel: xxxxxxxx'); I found this Function on the GitHub flutter repo:

How to set data to TextEditingController using StreamBuilder?

I'm loading some data from database (data that user previously saved, for editing). I used StreamBuilder to set data. I have form , which i used to display data

How to update a single item in flutter list, as a best way

How to update a single item in flutter list? I need best way. Why I am saying best way? I need to update a single item and dont want when update a single ite

Combine/merge multiple maps into 1 map

How can I combine/merge 2 or more maps in dart into 1 map? for example I have something like: var firstMap = {"1":"2"}; var secondMap = {"1":"2"}; var third

Listen to real-time change in Flutter from node.js api (mysql database)

I created my own api for (get/post/put/delete) methods using node js.....and implemented in flutter....how can i get real time change (change state without ref

In Dart, is it possible to pass an argument in a singleton?

class Peoples { late int id; late String name; static final Peoples _inst = Peoples._internal(); Peoples._internal(); factory Peoples() { retur

dart modulo operator circular list

I want to use the modulo (%) operator in order to access to list items in a circular way. But the code below doesn't work: void main() { List<String> my

How to get the snapshot.error in Flutter 2?

I updated my Flutter app to Flutter 2, and now when I try to get the snapshot.error in my StreamBuider I get this These are validators with Streams. class Logi

Dart InternetAddress.lookup failed for the local network, but works for google.com

Dart unable to connect the server running on the local network. In below code I am trying to find weather or not my host is reachable before making the API requ

Flutter - FloatingActionButton in the center

Is it possible to make the FloatingActionButton in the centre instead of the right side? import 'package:flutter/material.dart'; import 'number.dart'; import '

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

How to check if the user is logged in, if so show other screen?

My first screen is a login screen and it needs to check if the user is logged in to open the home screen directly but I get an error using this check. I'm doin