Invalid @GenerateMocks annotation: Mockito cannot generate a valid mock class which implements 'GetStorage' for the following reasons:
The method 'GetStorage.getKeys' features a non-nullable unknown return type, and cannot be stubbed without a dummy generator specified on the MockSpec.
The method 'GetStorage.getValues' features a non-nullable unknown return type, and cannot be stubbed without a dummy generator specified on the MockSpec.
[INFO] Running build completed, took 22.9s
[✓] Flutter (Channel stable, 2.5.1, on Ubuntu 20.04.3 LTS 5.11.0-34-generic, locale fr_FR.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2020.3)
[✓] Android Studio (version 4.2)
[✓] VS Code
[✓] Connected device (3 available)
I can't mock GetStorage
get_storage: ^2.0.3
Invalid @GenerateMocks annotation: Mockito cannot generate a valid mock class which implements 'GetStorage' for the following reasons: The method 'GetStorage.getKeys' features a non-nullable unknown return type, and cannot be stubbed without a dummy generator specified on the MockSpec. The method 'GetStorage.getValues' features a non-nullable unknown return type, and cannot be stubbed without a dummy generator specified on the MockSpec. [INFO] Running build completed, took 22.9s
[✓] Flutter (Channel stable, 2.5.1, on Ubuntu 20.04.3 LTS 5.11.0-34-generic, locale fr_FR.UTF-8) [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3) ✗ cmdline-tools component is missing Run
path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Runflutter doctor --android-licenses
to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/linux#android-setup for more details. [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio (version 2020.3) [✓] Android Studio (version 4.2) [✓] VS Code [✓] Connected device (3 available)