Category "dart"

Match child height size in a Navigator widget

I had a problem with the Navigator widget: I need to match the child widget height. My Navigator widget is inside an Expanded widget but when I change route to

Impossible to hot reload on VSCode

I'm trying to use hot reload on my Flutter project, but everytime I use it, I have this error: Hot reload received invalid response: {type: ReloadReport, succe

How to use Flutter to implement a button like ios virtual home button

I want to create a button can move to any position like iPhone Style (Virtual Home Button) in Flutter but I don't know any packages or any library can do it. Mo

How to use Flutter to implement a button like ios virtual home button

I want to create a button can move to any position like iPhone Style (Virtual Home Button) in Flutter but I don't know any packages or any library can do it. Mo

Refresh indicator doesn't work when list doesn't fill the whole page

I have a page the has a list with refresh indicator. When I have many elements in the list (filling the whole view and more, i.e. I can scroll), the refresh ind

Generate dynamic height horizontal listview nested in a vertical listview

I'm trying to generate a dynamic height HORIZONTAL listview that is nested inside a VERTICAL listview I'm already in the point of printing my horiztonal listvi

How do I fill Matrix4 with translation, skew and scale values in flutter?

Suppose, I have these values for a container of height 200 and width 300: scaleX = 0.9198 scaleY = 0.9198 skewX = -0.3923 skewY = 0.3923 translateX = 150 transl

SliverList inside ExpansionTile without Shrinkwrap (Flutter)

Is there any way to build a SliverList inside ExpansionTile? The reason I want to do this, I have a really large amount of data that needs to be put inside the

How can I filter a stream in Flutter?

I am new to flutter/dart and within this page, I have a list of "information resources" populating the screen with a widget I've created called InformationResou

Dart Generics - type is not a subtype

I'm getting a runtime error from a Dart generic function: Widget card = widget.cardBuilder(item); Which generates: type '(Contact) => Widget' is not a

How can I remove this gray line from ExpansionTile? (Flutter)

How can I remove this gray line from ExpansionTile in flutter? The Code ExpansionTile( title: Text( "Title", style: TextStyle

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

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

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

'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

'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