ZeroProcess
ZeroProcess

Reputation: 1221

Flutter markdown package dependency did not install correctly for me

I wan to use flutter markdown package, but I can't. I added dependency (in pubspec.yaml):

dependencies:
  flutter_markdown: "^0.0.9"

After I upgraded package and dependency, but when I used

import 'package:flutter_markdown/flutter_markdown.dart';

statement I got error message URI doesn't exist. I upgraded flutter and tried again, but nothing. I tried adding another way:

dependencies:
  flutter_markdown:
    git: "https://github.com/flutter/flutter_markdown.git"

But result is the same.

How can I solve this problem?

(I use other packages without problem.)

Upvotes: 4

Views: 1112

Answers (1)

vovahost
vovahost

Reputation: 36007

I solved this thanks to @raju-bitter comment. Steps:

  • Close your IDE (Android Studio/Intellij Idea/etc)
  • Remove the cache directory (My was located at C:\Users\Username\AppData\Roaming\Pub)

  • Reopen your IDE.

If you still get an error then execute flutter package get in your terminal or from IDE menu.

Upvotes: 1

Related Questions