Widgets

Markdown

Markdown

Render Markdown content inside a Ruflet view.

Example

markdown(
  value: "# Hello\n\nThis is **Markdown**."
)

Common properties

  • value
  • code_theme
  • selectable
  • extension_set

Usage

markdown(
  value: "## Release notes\n\n- Added controls\n- Improved builds"
)

Notes

  • Use markdown when content should stay text-first but still support formatting

Complete API

Helpers

  • markdown(value = ..., **props)

Accepted properties

  • align — Alignment of the control within its parent.
  • animate_align — Animates alignment changes.
  • animate_margin — Animates margin changes.
  • animate_offset — Animates offset changes.
  • animate_opacity — Animates opacity changes.
  • animate_position — Animates position changes.
  • animate_rotation — Animates rotation changes.
  • animate_scale — Animates scale changes.
  • animate_size — Animates size changes.
  • aspect_ratio — Width-to-height ratio to maintain.
  • auto_follow_links — Sets the auto follow links property.
  • auto_follow_links_target — Sets the auto follow links target property.
  • badge — Badge drawn on the corner of the control.
  • bottom — Bottom offset when positioned inside a stack.
  • code_style_sheet — Sets the code style sheet property.
  • code_theme — Sets the code theme property.
  • col — Responsive column span (1-12) per breakpoint.
  • data — Arbitrary value you can attach to the control and read back in handlers.
  • disabled — Disables interaction when true.
  • expand — Fills the available space along the parent's main axis when true.
  • expand_loose — Like expand, but only grows up to the child's natural size.
  • extension_set — Sets the extension set property.
  • fit_content — Sets the fit content property.
  • height — Fixed height in logical pixels.
  • image_error_content — Sets the image error content property.
  • key — Stable identity used to preserve state across rebuilds.
  • latex_scale_factor — Sets the latex scale factor property.
  • latex_style — Latex style.
  • left — Left offset when positioned inside a stack.
  • margin — Outer spacing around the control.
  • md_style_sheet — Sets the md style sheet property.
  • offset — Translation offset applied to the control.
  • opacity — Opacity from 0.0 (transparent) to 1.0 (opaque).
  • right — Right offset when positioned inside a stack.
  • rotate — Rotation applied to the control.
  • rtl — Renders right-to-left when true.
  • scale — Scale transform applied to the control.
  • selectable — Sets the selectable property.
  • shrink_wrap — Sets the shrink wrap property.
  • size_change_interval — Throttle interval for on_size_change, in ms.
  • soft_line_break — Sets the soft line break property.
  • tooltip — Text shown on hover/long-press.
  • top — Top offset when positioned inside a stack.
  • value — The control's current value.
  • visible — Hides the control when false.
  • width — Fixed width in logical pixels.

Events

  • on_animation_end — Fired when an animation completes.
  • on_selection_change — Fired when the selection range changes.
  • on_size_change — Fired when the control's size changes.
  • on_tap_link — Fired on tap link.
  • on_tap_text — Fired on tap text.

Wire reference

  • Family: shared
  • Widget type: markdown