Category "flutter"

Mock a Widget in Flutter tests

I am trying to create tests for my Flutter application. Simple example: class MyWidget extends StatelessWidget { @override build(BuildContext context) {

Sort a List in Dart based on how another List was sorted

I am trying to sort a list with reference to another list. Consider this example, List<String> a = ["a", "b", "c"]; List<int> b = [2, 3, 1]; Now,

How to show a progress Dialog before data loading in flutter?

In my Flutter project, I am doing API calls to fetch data by GET request. After parsing the JSON object from the response, I just show the value in the Text wid

How do you catch canLaunch exceptions using url_launcher in flutter?

Using the code from the package I was unable to catch the exception. Note that I would like to catch this specific exception. // from https://pub.dev/packages/

How do I get to tap on a CustomPaint path in Flutter using GestureDetect?

I'm very new to flutter and am trying to figure out how to get a gesture detected on a CustomPaint path. I can click on a host of other things but not on paths

BlocProvider.value Vs BlocProvider(create:)

i am using flutter_bloc, and i am wondering which method should i use and what is the difference between these two ways?: i read that the first one with (value)

How to get data from firestore document fields in flutter?

I'm trying to test firestore in my flutter-app but I can't really load the data as expected. This is how I get the data: Firestore.instance .collecti

Flutter: FLog and Logger

I am new in flutter and I am building an app in flutter and looking for logging options. I know there are several logging packages available like logger and flo

Flutter: Is there an onhold option instead of oppressed once to repeat SetState

I want a button which I can hold down and then Setstate is repeating, unless I stop holding it. I am a beginner and working at my first app. I want to calculat

In Flutter Google Maps how do I add and remove markers based on a realtime database listener?

I've read numerous docs, posts, etc. and cannot seem to get things to work. I have a realtime database listener that provides lat/long coordinates, inside a Fi

Flutter - Unable to Install Application to Emulator

I have a Flutter project that previously run on Flutter 2.2. Recently, I upgraded to Flutter 2.10 but unable to run the application on Android emulator. I've fo

How to set the background colour of a flutter tablecell?

The following code produces a table with 3 rows and 3 columns. In the second row the colour of the first and third cell is not showing up - I guess the contai

How to generate pseudo-random number in dart

I'm currently trying to pick up a random item in a list in dart. For this, I would like to generate a pseudo-random number (my seed) which will be the index whe

First Flutter App error: cannot resolve symbol "Properties"

I followed the steps in the Flutter document and tried to build my first Flutter app in Intellij IDEA. And when I try to run it,there was an error about my JAVA

How to remove space between keyboard and comment box in flutter?

I can't remove the space between the comment box and the keyboard. Please see the below image for the issue and below is my code floatingActionButtonLocation:

'onRequestPermissionsResult' overrides nothing when requesting access to storage using flutter

I am trying to get permission to access music files in android using onAudioQuery package flutter but it is giving me this error: e: C:\flutter\.pub-cache\hoste

How can I display the contents of nested list (contactArr list in the following json response) in JSON response in ListView in Flutter?

{ "status": 200, "message": "Data Found", "data": { I want to display this contactArr list in flutter ListView "contactArr": [{ "contact": "17301

'Null' is not a subtype of type 'Stream<int>' in type cast cubit(Bloc) flutter

I have created a cubit testing project in flutter which is working fine, but when I am writing a UI test case with mockito for the same it is throwing the follo

How to increase the width of getx default dialog in flutter

I am new to flutter and I am using Getx package for state management and route management. I have tried many ways to give get default dialog full-screen width b

Is there a plugin that can capture and view 360 degree images in flutter?

I have searched so much for Flutter plugin, but couldn't find any way in implementation of capturing 360 images in flutter. imageview360: This plugin only show