Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] When using the list tags (ul, ol, li) in HTML, the "liststyletype:none" property is ineffective. #1505

@Wan-g-k

Description

@Wan-g-k

Describe the bug:

In version 3.0.0, the ul and ol tags in HTML cannot be removed from the markup.

HTML to reproduce the issue:
<ul><li>ul-123</li><li>ul-456</li><li>ul-789</li></ul><ol><li>ol-123</li><li>ol-456</li><li>ol-789</li></ol>

Html widget configuration:

@override
Widget build(BuildContext context) {
  var texts = GetIt.I<Texts>();
  return Scaffold(
    appBar: AppBar(
        title: Text(
            texts.text("mc_initial_warning_title", fallback: "Important!"))),
    body:Html(
      data:"<ul><li>ul-123</li><li>ul-456</li><li>ul-789</li></ul><ol><li>ol-123</li><li>ol-456</li><li>ol-789</li></ol>",
      style: {
        'ul': Style(
          padding: HtmlPaddings.only(left: 0),
          listStyleType: ListStyleType.none,
        ),
        "ol": Style(
          padding: HtmlPaddings.only(left: 0),
          listStyleType: ListStyleType.none,
        ),
      },
    ),
  );
}

Screenshots:
Version 3.0.0

Image

Device details and Flutter/Dart/flutter_html versions:
Error happens in all devices

Stacktrace/Logcat
No Exception is thrown

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions