Category "dart"

Flutter - type 'Future<dynamic>' is not a subtype of type 'List<Map<String, dynamic>>'

I am using mysql1: ^0.19.2 and trying to fetch some data from a database to display in a select_form_field (select_form_field: "^2.2.0"). The database table I'm

Expected a value of type 'Map<String, dynamic>', but got one of type 'Null'

I'm using flutter and managing data by cloud_firestore. I could send data to firestore, but now I'm Struggling with reading data. In firestore, data are stored

Error: Expected a value of type 'int', but got one of type 'String'

screenshoot Error: Expected a value of type 'int', but got one of type 'String' at Object.throw_ [as throw] (http://localhost:50026/dart_sdk.js:5405:11) at Obje

Dart equivalent of Apache Commons Collections Bag

Is there a collection in Dart that allows storing multiple items along with their repetition count? For instance, such a collection is in Apache Commons Collect

Is there a way of assigning a future variable to another variable without returning null in dart?

I was trying to pass a data to a variable that returns future but it returns out to be null even though I'm using async and await. what is I'm missing here ? im

Can required parameters in a Dart constructor be named?

I am working with some Dart code for a Flutter/Dart class I'm taking. I expected the following code to compile, but it did not: class Person { String? name;

Flutter testing: static method I need to mock inside code

I want to test a method that is responsible for a button tap (let's call it onButtonTap()), one of the first methods is a call to static method from utils file,

Accesing downloaded files from a Flutter app

I am working on an app that should manage downloaded files. For now I am able to download a file on both platforms, but I would need to know how can I get the d

Flutter: How can I unit test a Timer used by a Bloc using blocTest?

How can I test a Timer inside a Bloc, using blocTest? I’m using the bloc library, with freezed to build the state and event objects (might not matter here

Fix all const warning flutter

How to fix this all const warning in VSCode? It's hard if I fix one by one.

Flutter returns null for AppLocalization.of(context)

I am using Flutter to build a Web-App and I want to use the internationalization feature of flutter on my new app. I was following the Flutter-Tutorial and I tr

Hi, I am developing an mobile application using flutter and I am bit confused if the strategy I am following is correct?

I created a separate Stateless widget called CustomAppBar will certain parameters. Every I need appBar in my app. I will use CustomAppBar and give required para

How can we add / remove the object values with respect to entries with hashmap?

List<ServiceModel> serviceList = [ ServiceModel(id: "12", name: "Repair", subServiceList: [ SubServiceModel(name: "Toilet Repair", id: "123"),

how to resolve sqflite error : MissingPluginException sqflite

I created my database with this function: void CreateDatabase() async { database = await openDatabase( 'todo.db', version: 1, onCrea

How to do file operations (create/write/update/delete files) using the Flutter "saf" Package

How to do file operations (create/write/update/delete files) using the Flutter "saf" Package. link:- pub.dev/packages/saf I didn't find any solutions on Google.

Flutter: converting an Image object to a base64 string without using a File

I grabbed somewhere the following code to convert a picture to a base64 string without accessing a file : String ImageToString(Image image) { String result;

how to disable scrolling NestedScrollView

I tried to use physics: NeverScrollableScrollPhysics() in NestedScrollView but still yet is still scrolling. How can disable scrolling in NestedScrollView if th

ERROR: The argument type 'Object?' can't be assigned to the parameter type 'String?'

I have a TextFormField widget wrapped inside a StreamBuilder, in TextFormField widget, inside the decoration, when is pass snapshot.error to the errorText argum

The getter 'documents' isn't defined for the type 'Object'

I have a collection called status in Firebase. I'm trying to pull data from here. However I am getting this error. I tried some solutions but I still get the sa

Flutter error Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102

Hello I have a flutter error although i dont have any bugs in code. This is all error: /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/provider-3.2.0/lib