Skip to content

type 'List<Expression>' is not a subtype of type 'List<LiteralTerm>' in type cast #590

@windows7lake

Description

@windows7lake
<a href="" style="text-decoration-line: none;"></a>

Parse the html above, <a> label with style="text-decoration-line: none;" property will report a issue as follow:

======== Exception caught by widgets library =======================================================
The following _CastError was thrown building HtmlParser(dirty, dependencies: [MediaQuery, _InheritedTheme, _LocalizationsScope-[GlobalKey#437e4]]):
type 'List<Expression>' is not a subtype of type 'List<LiteralTerm>' in type cast

The relevant error-causing widget was: 
  Html file:///Users/yinglin/Workspace/FlutterWorker/app-flutter/flutter100/lib/pages/article/detail/new/article_detail_view.dart:97:12
When the exception was thrown, this was the stack: 
#0      declarationsToStyle.<anonymous closure> (package:flutter_html/src/css_parser.dart:68:89)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:397:8)
#2      declarationsToStyle (package:flutter_html/src/css_parser.dart:10:16)
#3      inlineCSSToStyle (package:flutter_html/src/css_parser.dart:85:10)
#4      HtmlParser.applyInlineStyles (package:flutter_html/html_parser.dart:184:37)
...
====================================================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions