Category "flutter"

Flutter: SyntaxError: Unexpected token < in JSON at position 0

I need to fetch data from API but my try-catch fails with SyntaxError: Unexpected token < in JSON at position 0. Code: String problems; try {

How to hide actions from SliverAppBar when it's expanded?

I have a SliverAppBar with a background image and a list of actions, but I would like the actions to show only when the image disappears (when the SliverAppBar

Container margin not transparent

In my flutter project i have an AnimatedContainer which is my BottomAppBar. If i give it a margin to space it from the screen egdes the margin is not transparen

How to get Server Sent Events in my Flutter app?

I'm trying to receive SSE data as JSON in my Flutter app. But instead of getting the data I'm getting the following repeated arrays of numbers in my console.

Unable to run any flutter commands 'The flutter tool cannot access the file or directory'

Whenever I run a flutter command including: flutter doctor flutter clean flutter channel [any channel] etc I get the following error: Gregorys-MacBook-Pro:~ gre

Flutter unable to load image assets (Loading images through ListView.builder)

I tried to load from the assets/images folder using Listview.builder() but it keeps throwing this error: EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE The followi

How to allow landscape for tablets, but prevent it on mobile phones?

I'm forcing portrait mode on mobile phones, class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(Build

How to handle click on push-notification when application is in foreground?

I use the Firebase Cloud Messaging (FCM) in my Flutter project. The following packages: firebase_messaging: ^8.0.0-dev.15 flutter_local_notifications: ^4.0.1+2

Flutter web ignore resize

I would like to make my web app does not resize/responsive when the screen become smaller. For example when i decrease my browser size, instead of its adapting

How to set vertical and horizontal border in flutter datatable?

As I am new to flutter, I could not set the border in DataTable. Can anybody tell me how can I do that by using DataTable Widget? As per my requirement, I have

Load custom HTML on browser tests

I'm trying to write a test on browser (Chrome) with a custom HTML file. I followed the instructions and here is what I have: test/ |- web_test.dart |- web_tes

Flutter iOS version app crashed due to consuming high memory

I have developed a flutter app using the Bloc pattern. Everything was fine until we encountered a memory crash in iOS. The Android version works well without an

Pod install error on M1 Mac - Flutter project with native code like shared_preferences

I'm on a MacBook Pro M1 (and before someone says well it's because of M1 or something else, I've been programming with Flutter and M1 for weeks but then I must

How can I connect my flutter project to postgresql database? (ubuntu 20.04)

I tried using flutter dependency "postgres" but my connection is refused. I also don't know how to start my postgresql server on ubuntu or call it using a resta

Foodizone android studio running issue

I have foodizone flutter app, but when I try to build it in the android studio it gives an error main file missing, How to fix it? i have tried to clean with f

Using a Stream builder inside a Future builder (Flutter with Firestore)

I want to use a stream to get data from a Firestore document, but getting the stream involves reading from Firestore first. This means that it is async, and the

flutter- I don't know the difference between these two case

Case 1 : children: DUMMY_CATEGORIES.map((catData) { CategoryItem( catData.title, catData.color, ); }).toList(), Case 2 :

How to implement Uniformly Accelerated Motion Formula into Flutter Animation

I tried to create a Flutter Web App that can simulate Uniformly Accelerated Motion. So, I create a circle as the simulation object and some buttons. When the us

Refreshing a screen to update data in Flutter

I am trying to understand how to refresh my app screen with new data. The app is a dashboard that has several job cards and when another user applies something

How to generate List<TextSpan> dynamic?

Good Morning everyone, I Have different words of different lengths and I Need to create a dynamic List of TextSpan with every letter from the current word. I ha