Category "dart"

How to solve exception caught by widgets library?

I want to use cached network image to display images in my flutter app, however it shows this: ═══════ Exception caugh

Network requests in Flutter app on physical iOS devices are slow

I am working on a cross-platform app using Flutter, for Android, iOS and Web. For some reason though, network requests on iOS are very slow. The app works fine

Flutter iOS fatal error: 'Flutter/Flutter.h' file not found

When I try to build my iOS I was facing such error I think it's mostly with the webview_flutter package Failed to build iOS app Error output from Xcode build:

How to load images with image.file

I can't seem to simply load an image from the hard drive to the screen. Image.network seems straightforward. But I can't figure out how to use Image or Image.

Flutter build apk on release mode cannot generate updated version

I had run this flutter build apk to release my App. Now I had built version 2 of that. Now, I want to release my version 2 App. So, I run flutter build apk aga

How to design Filters in Flutter?

I am new to flutter and I wonder how to develop filters in flutter something like this (screenshot taken from google images), so I just want to know how to do f

Detect when we moved back to previous page in Flutter

We moved from Page1 to Page2 but now from Page2 we move back again to Page1 like this: Navigator.of(context).pop(); How can we detect on Page1 that we went ba

How to make flutter app responsive according to different screen size?

I am facing difficulties to make it responsive according to various screen sizes. How to make it responsive? @override Widget build(BuildContext context)

I want to show data change dynamically but its does not work

I am trying to show the product offer time left by using the difference between DateTime Now and the deadline date which is come from API, Here The Code: GridVi

Mongo Dart SubDocument Updating and Editing

Hello I have a data like that: { "_id":ObjectID(), "field1":"field1 value", "group1":{ {"name": "name1", "favoriteBooks":{"book1","book2"}}, {"name": "name

LateError (LateInitializationError: Field 'documentSnapshot' has not been initialized)

I am using Cloud Firestore in my Flutter application and I am facing this issue in app: LateError (LateInitializationError: Field 'documentSnapshot' has not bee

How to use more than just if/else in ternary operator?

I am having trouble with writing the right syntax for this ternary operator. I want to put like three 'if statements' and one 'else statement'. But as far as I

Preload network images to avoid load times

I'd like to add and remove items on top of each on the press of a button to avoid load times for network images. My idea is to add ~5 images to a Stack on top o

Flutter Firebase Realtime Database write/update to multiple nodes at once

I'm using Firebase as the backend to my Flutter project. I need to write to multiple nodes in one transaction. Now I have: await (_firebaseDatabase .ref

How to change Status Bar and App Bar color in Flutter?

I'm trying to change the color of the system status bar to black. The configuration seems to be overridden by the AppBar class. I can achieve what I want by ass

How do I convert a date/time string to a DateTime object in Dart?

Say I have a string "1974-03-20 00:00:00.000" It is created using DateTime.now(), how do I convert the string back to a DateTime object?

What is the use of constant values in dart?

As described in the documentations: The const keyword isn’t just for declaring constant variables. You can also use it to create constant values, as w

How To Create Folder in Local Storage/External Flutter?

import 'package:path_provider/path_provider.dart'; import 'dart:io'; void createAppFolder() async { final directory = await getExternalStorageDi

Can't build a flutter project with PathProvider dependency

Disclaimer: First of all, this is my early attempt to play with Flutter. So forgive me if is a noob question. I had been playing with an MVP-Clean architecture

Stringbuffer access by index or range

TLDR: I am looking for a datastructure with the properties of a string buffer that I can access by index in dart. Long version: I need the properties of Stringb