Category "flutter"

How to format TimeOfDay to String in flutter

I want to display the current time. Used TimeOfDay.Now() to get the current time, TimeOfDay _currentTime = TimeOfDay.now(); Text("Current Time: ${_currentTime

How to convert CameraController's XFile to Image type in Flutter?

Flutter's CameraController has a takePicture() method for taking picture from the camera which gives type of Future<XFile>, so I need to convert it to Ima

Flutter just_audio - why is setting audio source as LockCachingAudioSource failing?

I am greatly interested in using the LockCachingAudioSource feature in Flutter's just_audio package, but I am noticing a strange behavior I can't quite get to t

Error in initializing AnimationController in flutter

I'm trying to make animated icon but I have an error in AnimationConroller _controller line, before I write any code for Icons. Here is the code: class _MyHomeP

Flutter Injectable Inject a Third Party Dependency

I've been spinning my wheels for hours on the simple question of how to inject http.Client into a flutter class when using injectable. They reference doing this

Dealing with API endpoints in flutter

I have started learning to code since a few days back, and am only familiar with HTML/CSS/JS, and basics of dart/flutter I am working on a Random quotes generat

Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)

I've just updated my flutter project packages to be null-safety compliant and now Android Studio wants me to update my project to use the latest version of Kotl

Flutter Pull To Refresh

I've implemented this code to show a list of json data from a web url. I've tried to implement a simple pull to refresh, but nothing works. Flutter code is lon

Synchronize sending data to the server, whether there is internet or not in Flutter

I am trying to add the temporal feature in my application so that if there is an Internet, the data is sent in the application, and in the absence of the Intern

Dart Analysis problems not shown in editor in Android Studio Bumblebee

After upgrading Android Studio to v2022.1.1 (Bumblebee) Dart Analysis problems shown in the corresponding tab are not shown within the editor itself. Typos on t

How to connect external camera in flutter by Iowebsocketchannel ? Iowebsocketchannel isn't responding in the android emulator

I am new into flutter. Please help me find out why the android emulator isn't responding? I want to make an external camera (esp32-cam)as a client with a local

How to load initial state data from sqlite database when Flutter app open

I'm making a simple Notepad app using flutter. I want to load already saved data from the SQLite database and initialize the state when the app opens. I tried w

Error: Could not find the correct Provider<ClientsProvider> above this Clients Widget in flutter?

I'm getting a list of clients from the Api, in a clients' list screen, when I want to Update a client, I navigate through DetailClient Screen than navigating th

Flutter: Google sign-in method, unable to open the select email account after clicking sign in with google

I am trying to create a button to sign in using a google account in Flutter. I am using the google sign-in package for authenticating through Firebase. I have c

Mapbox SDK Registry Token is null

I'm experiencing issues installing mapbox_gl plugin on my flutter app... I did follow the official instrctions from there : https://pub.dev/packages/mapbox_gl B

Flutter white flicker when pushing route before backgroundImage

In my flutter app, after the splash screen animation is finished, it pushes to the HomeRoute. The HomeRoute has a backgropundImage which is intended to cover t

Error setting-up flutter_localizations package "Target of URI doesn't exist: 'package:flutter_gen/gen_l10n/app_localizations.dart'."

This error appears when I try to add language support to my flutter application: Target of URI doesn't exist: 'package:flutter_gen/gen_l10n/app_localizations.da

Upload image flutter web with dio formdata

I am trying using file_picker and dio packages to upload files as form data. This is for flutter web and it seems MultipartFile.fromFile is not accepted. What

unable to send post request in dio - flutter

I'm trying to send Post request from Flutter(dio) to my Flask Restful API and I want to give the request body in form-data because an image file needs to be sen

How can I get day name from string date '22 May 2022' in flutter

I am a beginner in Flutter, I want to get day name [like Sunday] from a date, date i am getting from api which is basically a string like '22 May 2022' How can