merlinofcha0s / generator-jhipster-flutter

A Flutter module for JHipster. It will generate mobile app (iOS, Android) with Flutter
https://cyril-casaucau.medium.com/get-started-with-the-flutter-generator-for-jhipster-11ed2b1f038d
54 stars 23 forks source link

Following dependencies don't support null safety #58

Closed omurthy closed 3 years ago

omurthy commented 3 years ago

Hi When i try to flutter run command i get error message below :

Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering". Launching lib\main.dart on sdk gphone x86 in debug mode... Error: Cannot run with sound null safety, because the following dependencies don't support null safety:

  • package:flutter_bloc
  • package:dart_json_mapper
  • package:bloc
  • package:provider
  • package:formz

For solutions, see https://dart.dev/go/unsound-null-safety

FAILURE: Build failed with an exception.

  • Where: Script 'C:\FlutterSDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

    Process 'command 'C:\FlutterSDK\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 19s

Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 20.5s Exception: Gradle task assembleDebug failed with exit code 1

When i try to flutter pub get i get this error :

flutter pub get Warning: You are using these overridden dependencies: ! glob 2.0.0 (2.0.1 available) ! intl 0.17.0 ! reflectable 3.0.0-nullsafety.1 (3.0.1 available) Running "flutter pub get" in flutter-app... 1,418ms

My $flutter --version

Flutter 2.0.4 • channel stable • https://github.com/flutter/flutter.git Framework • revision b1395592de (3 weeks ago) • 2021-04-01 14:25:01 -0700 Engine • revision 2dce47073a Tools • Dart 2.12.2

and

My jhipster --version

INFO! Using JHipster version installed globally 7.0.1

omurthy commented 3 years ago

i fixed by added this line // @ dart = 2.9 on top of the main.dart file.

merlinofcha0s commented 3 years ago

Hello,

No need to downgrade the dart version, if you use intelliJ can use the generated configuration (dev and prod). If you want to use the command line you can add flutter run --no-sound-null-safety