Category "flutter-test"

How to Widget test Share package using widget test

I have an issue with trying to test Share package. My code looks like this: IconButton( key: Key('share-button'), icon: Icon(Platform.isAndroid ? Icons.shar

Widget test fails with No MediaQuery widget found

My question is about flutter widget test, what is proper way to test existing widgets wrapped new Scaffold(...)? I have found MediaQuery.of but it accepts Build

The argument type 'Future<UserCredential>' can't be assigned to the parameter type 'dynamic Function()'

I am learning about TDD and practicing my test writing. I want to write a test for my login through Firebase. here is the test file: import 'package:firebase/fi

Running all flutter unit tests from Android Studio

I used to be able to run all my Flutter unit tests from the Android Studio GUI by right clicking on the tests directory and clicking on "Run 'tests in my_app'".

Flutter testing error: NotInitializedError which involves environment variables (.env)

To start, I did review this but to no avail. How to access Flutter environment variables from tests? import 'package:flutter/widgets.dart'; import 'package:flut