Category "dart"

How to Disable ReorderableListView Reorder capability but still allow scrolling?

How do we deactivate the ReorderableListView dragging/reordering capabilities in Flutter? I would like to disable the dragging function but still allow scrollin

The state of flutter bloc is not updating if called outside the bloc builder

I initialised all necessary blocs in my main file. Even after this, the state of bloc is not updating if called from outside the bloc builder. I am trying to im

How to open existing flutter project from Xcode?

I have an existing flutter project, which coded with VS Code. Now I want to open it from Xcode to do some configurations in Runner.xcworkspace. But it was unab

How to delete a specific array element in firebase collection?

I have list of appointments stored in firebase collection, how can I delete a specific appointment ?

How to update data and restart the timer on click?

I have data in the application and the exchange rate is updated by a timer every 5 seconds. How can I make it so that when a floatingButton is clicked, the data

How to refresh snapshot in flutter

I what to refresh home page so I create widget called RefreshWidget look like this import 'dart:io'; import 'package:flutter/cupertino.dart';

Flutter won't compile a release build of my app?

After working on this app I tried to build my app to iOS using the flutter run --release command. But whenever I do I get this error *Could not build the precom

I want to change my app name to S&S in flutter ios in info.plist but i am getting error

I want to use "&" in app name for ios. what's method . i want to change name in CFBundleName tag in info.plist file of flutter. i am getting error while com

Parse long String of coords into lat & longs Flutter

I receive a String of Lats & Longs from an API call in Json "lineStrings": [ "[[[-0.301457,51.515017],[-0.288265,51.51014],[-0.280462,51.503057],[-0

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