Category "dart"

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) =

Does the onValue listener for Realtime Database return items in the same order that they are added to the database?

I don't see this specified in the docs anywhere. Does this listener return the node's data in the order that it is added to the node? For example, if I add mess

Assets in Flutter package are not visible in the app

I've created a package, which uses some assets (sf2 file, ttf files, etc). Assets don't seem to load. I can fix this by including these files in the assets fold

Flutter how to center Textfield on screen after the user taps on it?

I am just wondering how should I go about making the Textfield widget to be on the center of the screen when the user taps on it? Right now with what I have, th

How to upload Multiple Images to rest API in Flutter?

I am trying to upload upload multiple images to Rest API in flutter. the code i have written is given below: final List<File> _image = []; Future<F

Flutter: go_router connect to flow_builder

go_router can't use declarative flow of steps. Like steps of registration, where you can fill the form and call goNext() But flow_builder can. It allows you to

Cannot run flutter application on newly set up environment

I've got a flutter app that has last been working on about two years ago and I wanted to pick it up from there and do some further changes. I installed flutter

Riverpod StateNotifierProvider depend on a FutureProvider

I have a StateNotifierProvider that depends on a FutureProvider. Currently they look like below. final catalogProvider = StateNotifierProvider<CatalogNotifie

stop watch timer on flutter. How can I print the time in the terminal while pressing a button?

What I would like to do is printing the current time on the terminal while pressing the reset button. ElevatedButton( onPressed: () {

pull to refresh freezes the WebView scrolling in flutter

After implementing the pull to refresh button on webview I'm facing the screen scrolling issue on webview. When I try to scroll the screen upwards or downwards