Category "dart"

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

I/UrlLauncher(17669): component name for (url) is null

Why does it throw an error and give me the link is empty even though the link exists? And when I use launch (url) alone, the link opens without any problems S

I/UrlLauncher(17669): component name for (url) is null

Why does it throw an error and give me the link is empty even though the link exists? And when I use launch (url) alone, the link opens without any problems S

Where to put widget init/deinit code in Flutter

I'm building a widget that listens for UDP packets on the network and then updates the child widgets accordingly. I'm not sure where to put the init code for th

How to convert unicode with hex to String in dart / flutter

%u0BB5%u0BA3%u0B95%u0BCD%u0B95%u0BAE%u0BCD Above is unicode with hex characters string Need to convert that to readable text When decoded, the above text will r

How to localize BottomNavigationBarItem labels

Is there any workaround to translate the BottomNavigationBarItem into different languages? I use Lang.getString(context, key) to access a map(loaded from a json

How can I execute a function during the count-down timer?

I want to collect some real-time values during a time period and then proceed accordingly. Below is the code of java android studio. However, I cannot find any

Combining good old providers with Riverpod

I have an existing app that implements provider pattern. A sample provider would be: class SampleProvider { static SampleProvider of(BuildContext context) =