Mockito mocked function returned Null

I got stuck on making the test using Mockito. I'm trying to implement Clean Architect to the Flutter tutorial <a href="https://docs.flutter.dev/get-started/codelab" re...

Null is not a subtype of type Future&lt;Either&lt;Failure, NumberTrivia&gt;&gt;

I am implementing the flutter project in TDD Clean Architecture by following this video: <a href="https://www.youtube.com/watch?v=lPkWX8xFthE&amp;t=1s" rel="noreferrer...

Hot Reload during Unit testing

I develop right now a small flutter app. I think as everyone, I fell in love with the hot reload feature. So now I'm wondering if there is any possibility to...

Should we source control the .mocks.dart files created by build_runner for mockito

Because of <em>null safety</em> in dart, we had to update our codes test. We are using <em>mockito</em> for mocking the dependecies for the given class. As per their <...

Return a valid BusinessCard Model based on a json file using Flutter TDD

I'm trying to learn flutter TDD and I would like to make a code that should return a valid BusinessCardModel from json file that contains information about business ca...

Best Approach To Testing App Appearance In Flutter While App Is In Dark/Light Theme (especially for Dark Theme)

After going through the <a href="https://flutter.dev/docs/cookbook/testing" rel="nofollow noreferrer">Flutter docs on testing</a>, I have come to a point in my app whe...

ERROR: type String is not a subtype of type int of index while using fromjson in flutter

I am learning TDD(Test Drive Development) in a flutter. Here I am trying to parse my JSON data but every time I run the test I get an error saying this. <blockquo...

TDD in Flutter/Dart. How to reduce start up time

I try to do Test-Driven Development (TDD) in Dart for the business logic of apps with Flutter. The startup time for running the test feels a little bit slow for fast T...

How to do TDD implementing BLoC pattern on Flutter

I am a student in iOS mobile development, and I recently learned about code architectures (MVC) and tests (TDD), and I understand how it saves so much time during deve...

ERROR: NoSuchMethodError: The method toDouble was called on null. Receiver: null Tried calling: toDouble()

I am trying to make fromJson function which parse the json file. But while running test I am getting this error saying. <blockquote> ERROR: NoSuchMethodError...