Category "dart"

Test API calls in Bloc in Flutter

Im first time trying to write Tests for Bloc, Here I face the problem that is : NoSuchMethodError: The method 'fetchPlayerToLogin' was called on null. Receiver:

How to Fix The method '>=' was called on null. Receiver: null Tried calling: >=(25) in dart flutter

Guys, I am trying to create a BMI calculator app. everything is working fine but I am getting an error which is shown below while passing data in the condition

Flutter FCM: Storing Notification Data while the app is in the Background/Closed

I am trying to store data received via FCM inside a class in order to navigate to a specific tab of my app after a user clicks on that notification. My problem

I get this error after the installation of kommunicate chat bot in the app

FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:processDebugMainManifest'. Manifest merger failed : Attribute applica

The method 'copy' isn't defined for the type 'PickedFile'

After i upgraded Flutter i followed all the steps for migration code and now i get this error, can't use to .Copy. class ImageInput extends StatefulWidget { f

How to get the index of each element in a list flutter?

I ran into a problem. I have a Checkbox in the value method, I need to specify _isChecked[index]. But I have an error on the word index. I understand why the er

Is there a formula that swaps two elements in an array?

Is there a formula that swaps two elements in an array? for example nums=['a','b','c','d']; Swapping d and b and making my new string nums=['a','d','c','b'];

Notification channel 'basic_channel' does not exist., n.a.a.k.f.a:

As per flutter package I implemented code on my project but it threw exception while making build, "Notification channel 'call_channel' does not exist., n.a.a.k

Module was compiled with an incom patible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0

My app compiles, but after looking into a few related questions like (Module Error "Module was compiled with an incompatible version of Kotlin. The binary versi

Vs Code Small Guide

Whenever i write code in Dart in Vscode It shows me guide about stuff I don't want to see How can I get rid if this annoying guide

Casting DatabaseEvent snapshot.value to a specific type in Flutter

I'm trying to retrieve data from a DatabaseEvent event type. The data I have on the database is this in this layout Basically some users id and each user has a

When adding a flutter dependencies in terminal, but it showing in terminal "Expected to find project root in current working directory."

In my project, When adding a flutter dependencies in terminal, but it showing in terminal "Expected to find project root in current working directory."

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 {

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.

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

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

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

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 :