Skip to content
pubscout

markdown_widget

2.3.2+8, released 2 years ago by morn.fun

A simple and easy-to-use markdown rendering component for Flutter.

WASM-ready
$ flutter pub add markdown_widget
Source repository

What it does

Renders markdown data as Flutter widgets with support for code highlighting, table of contents (TOC), and custom tags. It supports all platforms including Android, iOS, Web, Windows, macOS, and Linux.

AI-written summary of version 2.3.2+8, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to render markdown content in your Flutter application.
  • You need features like code highlighting and a table of contents (TOC) out of the box.

Skip it when

  • You need complex native HTML tag conversion by default without extensions.

Strengths

  • Supports all platforms.
  • Built-in table of contents (TOC) functionality.
  • Code syntax highlighting and night mode support.

Weaknesses

  • Does not support the conversion of HTML tags by default without extensions.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
6
import 'package:flutter/material.dart';
import 'package:markdown_widget/markdown_widget.dart';

class MarkdownPage extends StatelessWidget {
  final String data;

  MarkdownPage(this.data);

  @override
  Widget build(BuildContext context) => Scaffold(body: MarkdownWidget(data: data));
}

Alternatives

Packages that do the same job and could replace markdown_widget.

  • flutter_md

    Fast Markdown parser and canvas renderer for Flutter with text selection and streaming.

  • code_editor

    A Flutter code editor widget with syntax highlighting, custom themes, and file navigation.

  • textf

    Drop-in Text and TextEditingController replacements for inline Markdown-like text formatting

  • val_highlight_flutter

    Flutter widgets for displaying and editing syntax-highlighted code.

Works with

Packages commonly used together with markdown_widget: ones it builds on, ones built on it, and its own family.