I have successfully installed the dependency in pubspec.yaml and the exit code was 0.
When I import 'package:flutter_html_view/flutter_html_view.dart';
It shows that it has been imported via vs code (It underlines it as imported but not used)**
But when I save or restart my emulator, it will refuse to build. returning the following errors:
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.2.0/lib/src/builder.dart:326:49: Error: The getter 'children' isn't defined for the class 'InlineSpan'.
- 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart' ('/C:/src/flutter/packages/flutter/lib/src/painting/inline_span.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'children'.
List<TextSpan> children = previous.text.children != null
^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.2.0/lib/src/builder.dart:327:41: Error: The getter 'children' isn't defined for the class 'InlineSpan'.
- 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart' ('/C:/src/flutter/packages/flutter/lib/src/painting/inline_span.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'children'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'children'.
? new List.from(previous.text.children)
^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.2.0/lib/src/builder.dart:326:49: Error: The getter 'children' isn't defined for the class 'InlineSpan'.
- 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart' ('/C:/src/flutter/packages/flutter/lib/src/painting/inline_span.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'children'.
List<TextSpan> children = previous.text.children != null
^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.2.0/lib/src/builder.dart:327:41: Error: The getter 'children' isn't defined for the class 'InlineSpan'.
- 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart' ('/C:/src/flutter/packages/flutter/lib/src/painting/inline_span.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'children'.
? new List.from(previous.text.children)
^^^^^^^^```
What are your SDK constraints? You're using an extremely old version (0.2.0
) of package:flutter_markdown
from 2018, back from before Flutter was even stable. Using the latest compatible version (^0.6.2
, ideally) should fix your issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With