Flutter-responsive-email-ui---Mobile-Tablet-and-Web icon indicating copy to clipboard operation
Flutter-responsive-email-ui---Mobile-Tablet-and-Web copied to clipboard

Error

Open adsazad opened this issue 4 years ago • 1 comments

../../.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.18.1/lib/src/picture_provider.dart:50:59: Error: No named parameter with the name 'nullOk'. context != null ? Localizations.localeOf(context, nullOk: true) : null, ^^^^^^
../../flutter/packages/flutter/lib/src/widgets/localizations.dart:413:17: Context: Found this candidate, but the arguments don't match. static Locale localeOf(BuildContext context) {
^^^^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script '/home/arashdeep/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991

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

Process 'command '/home/arashdeep/flutter/bin/flutter'' 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 2m 46s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 168.9s Exception: Gradle task assembleDebug failed with exit code 1

adsazad avatar Mar 28 '21 15:03 adsazad

Actually the fix is quite simple : go in your Flutter SDK path, then in .pub-cache\hosted\pub.dartlang.org\flutter_svg-0.18.1\lib\src, and edit "picture_provider.dart". Inside (line 50), replace : context != null ? Localizations.localeOf(context) : null, with : context != null ? Localizations.localeOf(context, nullOk: true) : null,

Might sometime be in %LOCALAPPDATA%\Pub\Cache, but it's just a guess : I'm a total noob with Flutter... ;)

avrilconseil avatar Apr 12 '21 18:04 avrilconseil