我曾尝试将Package Parser HTML与Flutter一起使用,但已尝试编译,将返回此错误:
import 'package:flutter/material.dart';
import 'package:scrapy/scrapy.dart';
import 'package:html/parser.dart' as html;
Compiler message:
Error: Could not resolve the package 'html' in 'package:html/parser.dart'.
lib/main.dart:3:8: Error: Not found: 'package:html/parser.dart'
import 'package:html/parser.dart' as html;
仅html解析器是错误的
您可能没有添加软件包或没有得到它。
以下列方式添加。
dependencies:
html: ^0.14.0+3
现在在终端中运行以下命令:
flutter pub get