Category "dart"

Flutter delete Hive Database on Update

I have a Flutter app and I am using Hive to store data. I have deleted some adapters which were used previously. This caused an error and I have to delete the o

Flutter; replace item in list

I have a list in my app. It containe a couple of items. I want to replace every item that is equal to a user-input(A String) , with another user-input(Another S

Firebase Storage await uploadTask.onComplete outdated

Im using this code. The error message is the following: error: The getter 'onComplete' isn't defined for the type 'UploadTask'. (undefined_getter at [chatneu] l

How to set token in authorization header in flutter Dio post request

I want to set a token in the authorization header on my post request using Dio. I have tried to set the header using two options. And both don't work. The first

Is it possible to add the latest version of a dependency to pubspec.yaml without finding it myself?

Lets say I am starting a new dart project. I have a few packages on pub.dev I know that I want to use, and I want to use the most recent version of these packag

disable screen record with sound in flutter

I am trying to disable screen record and screenshot in my flutter app and I already did using flutter_windowmanager package. my problem is with screen recording

Flutter TextField with currency format

There's is some way to do a money format in a TextField to when the user going typing the value it going already formatting in real time? Like in the above i

how to resolve the iOS deployment target issue in flutter

I am facing this issue related to IPHONEOS_DEPLOYMENT_TARGET while build the flutter application for the ios platform repeatedly, I am not able to understand h

How to request and check permissions in Flutter

I am using a various plugin to get user data, contact, photos and camera when the user clicks Don't allow, The application goes silent. I want to show the user

Flutter images not loaded (EXCEPTION: resolving an image codec)

When I try to run images assets doesn't get properly loaded, I am getting an exception: The following assertion was thrown resolving an image codec: Unable

How do I get the directory of the current script, in Dart?

I want to know what the script's directory is. I have a command-line Dart script.

How to use InputFormatter on Flutter TextField?

What do I need to insert into TextField(inputFormatters:? I want to disallow \ and / in one TextField and only allow a to Z in another.

Create a rounded button / button with border-radius in Flutter

I'm currently developing an Android app in Flutter. How can I add a rounded button?

How can I have rounded corner on my Dismissible widget?

I'm currently developing a widget that needs to have rounded corners, but whenever I'm dragging my Dismissible widget from left to right, the Dismissible widget

How can I check if a Flutter application is running in debug?

I'm looking for a way to execute code in Flutter when the app is in Debug mode. Is that possible in Flutter? I can't seem to find it anywhere in the documentati

Flutter shared_preferences not persistent?

I have been using shared_preferences in flutter, was working fine until now. Suddenly it stopped working, both in iOS and Android. I debugged it step by step an

Flutter: How to use SharedPreferences synchronously?

I am using Shared Preferences in my Flutter app and what I would like to do is store SharedPreferences as a field on startup and then use it synchronously in th

pub get failed : A package may not list itself as a dependency

I'm having this problem in pubspec.yaml : here the pubspec.yaml : dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 pluto_grid: ^2.9.3 and

Flutter: Run method on Widget build complete

I would like to be able to run functions once a Widget has finished building/loading but I am unsure how. My current use case is to check if a user is authentic

flutter: Exception DioError [DioErrorType.DEFAULT]: type 'String' is not a subtype of type 'Map<String, dynamic>'

I am new in flutter and I am not able to solve this issue can anyone help me? I am able to get data in string if I type Future<String> login() instead of