-2

I had tried everything like adding dependencies but VS Code don't show that package is downloaded.
I'm unable to use import 'package:flutter_svg/flutter_svg.dart';

pubspec

Main

  • Need to align your flutter_svg package as flutter package. – Ronak Patel Sep 18 at 9:43
1

You can change indent of flutter_svg in pubspec.yaml
from

flutter:
  sdk: flutter
  flutter_svg: ^0.19.0
  

to

flutter:
  sdk: flutter
flutter_svg: ^0.19.0
| improve this answer | |
0

Maybe if you run flutter pub get in the terminal, then flutter clean then restart your vs code it should work

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.