abuanwar072 / E-commerce-App-UI-Flutter

Nice and clean Online Shop app UI by using #Flutter.
https://youtu.be/XBKzpTz65Io
2.02k stars 1.04k forks source link

how to solved this debug error? E-commerce-app-ui-flutter #12

Open i-coder-robot opened 3 years ago

i-coder-robot commented 3 years ago

i have updated dependency,

android studio version 2021.1.1 Canary 11 flutter version 2.5

debug error message:

Launching lib/main.dart on sdk gphone x86 arm in debug mode... Running Gradle task 'assembleDebug'... ../../flutter/.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.

HarishSTOnline commented 3 years ago

Update the flutter_svg package. https://pub.dev/packages/flutter_svg/versions

I updated to the latest version by changing flutter_svg: ^0.18.0 to flutter_svg: ^0.22.0. And ran flutter pub get. After that, the build was successful!

HarishSTOnline commented 3 years ago
diff --git a/pubspec.yaml b/pubspec.yaml
index 5628656..2c14cdf 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -27,7 +27,7 @@ dependencies:
   # The following adds the Cupertino Icons font to your application.
   # Use with the CupertinoIcons class for iOS style icons.
   cupertino_icons: ^0.1.3
-  flutter_svg: ^0.18.0 # it help us to use SVG in our app
+  flutter_svg: ^0.22.0 # it help us to use SVG in our app

 dev_dependencies:
   flutter_test:
HarishSTOnline commented 3 years ago

13