Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.75k stars 805 forks source link

Target of URI doesn't exist: 'package:flutter_html_table/flutter_html_table'. #1370

Closed OSA413 closed 8 months ago

OSA413 commented 8 months ago

Describe the bug:

So, I've recently found that new version of the package requires additional package for table rendering. After installing the package with the following instruction: https://pub.dev/documentation/flutter_html/3.0.0-beta.2/#flutter_html_table I ran into the issue that Flutter can't resolve the table dependency.

HTML to reproduce the issue:

//pubspec.yaml
dependencies:
  flutter_html: ^3.0.0-beta.2
  flutter_html_table: ^3.0.0-beta.2

//other_file.dart
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html_table/flutter_html_table';

A picture of a cute animal (I'm not sure if bug can count as an animal but I got the picture)

image

erickok commented 8 months ago

Have you run pub get? You might also want to update to flutter_html_table: 3.0.0-alpha.3.

OSA413 commented 8 months ago

Yes, I've run flutter pub get, downgrading to 3.0.0-alpha.3 didn't help.

OSA413 commented 8 months ago

Turns out I had to put .dart at the end of the path to make it work. Full path is the following:

import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html_table/flutter_html_table.dart';