Category "dart"

How to fix this issue ? FAILURE: Build failed with an exception

I try to add a package name as new_version: ^0.2.3. After the terminal return the below error. How can I fix this? FAILURE: Build failed with an exception. Wher

The method '[]' was called on null. Receiver: null Tried calling: []("main") console error

Hi i am working on a weather app i learnt from a course, everything was working fine till i start with the refactoring and it just got complicated the code show

Flutter : endDrawer icon hiden or actions button hiden

I had in my code a Drawer, and to hide the burger incon, i use "automaticallyImplyLeading = false". But now, i change to endDrawer and i dont know how the hide

I want to use custom font in Flutter Image.drawString

This is about Flutter, Dart, Image, specifically drawString function. First of all, what I am trying to do is watermark the picture taken with the address and t

How to write an expression into a method?

How can I write the expression into a separate method for optimization: final listOfKeys= [_firstTabNavKey, _secondTabNavKey, _thirdTabNavKey] onWillPop: (

How to solve flutter web api cors error only with dart code?

It seems like CORS error is well-known issue in the web field. But I tried flutter web for the first time ever and I faced critical error. The code below worked

Explict generic type in function by default replace this type to dynamic inside

Why explict generic type in function by default replace this type to dynamic inside? example: class Boo { void displayType<int>() { print('type int

How to assign the non-nullable local variable "_msg"

I'm trying to make a Login form in flutter using a string function here is the code: String validateEmail(String value) { String _msg; RegExp regex = RegExp

Bloc depends on unregistered type - Injectable

I'm using injectable lib according to a tutorial in youtube some of annotations replaced. but I visit injectable lib in pub.dev look to the changelog and replac

How to get OTP from SMS - autofill

I want to catch or read OTP of SMS messages automatically. I did some tests like this code : import 'package:flutter/material.dart'; void main() { runApp(MyA

late initilization error shared prefrences in flutter?

even after i have intitialized there is an error : Late initialization error displayName here is the code where i have set the value: var displayName=json

How can i solve the red warnings in flutter when i start to to run

i have everything up to date in flutter and dart. and i have no issues when i run flutter doctor . everything sound good but i still get these red warnings line

Have anyone tried using rule engine for dart?

I'm still new in developing mobile apps so I'm struggling to understand how to use it since there's no examples of people using it. I want to use a rule engine

Error: Member not found: 'packageRoot', how to solve ignore: deprecated_member_use in Flutter?

In my flutter project, I have made some updates of plugins and then used flutter upgrade. After that, whenever I am running my flutter project it is showing fol

How do I add a country code dropbox in a login page in flutter?

I am trying to add a country code drop box in a login page with the mobile number ,but it is showing some or the other errors .I need an easy approach to add co

Creating interface in dart like typescript

I am from typescript background and new to dart, in typescript we are able to define interface and attach those types to the required variable which have the co

Flutter - Can't get collection from firestore

_getLatestCompletedWorkout() async { try { QuerySnapshot workouts; workouts = await FirebaseFirestore.instance .collection('users')

showing Could not determine the dependencies of task ':app:compileFlutterBuildDebug'. in flutter when try to run application

this is the error that shows when running the app. I tried running both debug mod and without debug and it still shows this error * What went wrong: Could not d

How to set kate voice for ios en-GB. in flutter - flutter_tts pub

How to set kate voice for ios en-GB. I m doing the below code but it's doing Daniel's voice and I want to set kete voice for the same. Future setLanguage({Strin

Does autoDispose in riverpod works same as dispose lifecycle in Flutter?

Does autoDispose in Riverpod's StateProvider disposes controllers? Does both the following statements works similarly? final _controller = StateProvider.autoDis