pub struct Markdown {
pub key: Option<KeyRef>,
pub config: MarkdownConfig,
pub padding: EdgeInsets,
pub controller: Option<ScrollControllerRef>,
pub physics: Option<ScrollPhysicsRef>,
pub shrink_wrap: bool,
}Expand description
Markdown in a scrolling list, one block per item.
Fields§
§key: Option<KeyRef>§config: MarkdownConfigfit_content is false by default.
padding: EdgeInsetsAround the blocks, inside the scrolling area.
controller: Option<ScrollControllerRef>§physics: Option<ScrollPhysicsRef>§shrink_wrap: boolWhether the list takes its content’s height rather than all the height it is given.
Implementations§
Source§impl Markdown
impl Markdown
Sourcepub fn padding(self, padding: EdgeInsets) -> Markdown
pub fn padding(self, padding: EdgeInsets) -> Markdown
Sets the padding around the blocks.
Sourcepub fn controller(self, controller: ScrollControllerRef) -> Markdown
pub fn controller(self, controller: ScrollControllerRef) -> Markdown
Sets the controller of the list’s scroll position.
Sourcepub fn physics(self, physics: ScrollPhysicsRef) -> Markdown
pub fn physics(self, physics: ScrollPhysicsRef) -> Markdown
Sets how the list responds to scrolling.
Sourcepub fn shrink_wrap(self, shrink_wrap: bool) -> Markdown
pub fn shrink_wrap(self, shrink_wrap: bool) -> Markdown
Sets whether the list takes its content’s height.
Source§impl Markdown
impl Markdown
Sourcepub fn options(self, options: Options) -> Markdown
pub fn options(self, options: Options) -> Markdown
Sets the extensions the text is parsed with.
Sourcepub fn style_sheet(self, style_sheet: MarkdownStyleSheet) -> Markdown
pub fn style_sheet(self, style_sheet: MarkdownStyleSheet) -> Markdown
Sets the look, in place of the inherited DefaultMarkdownStyle.
Sourcepub fn fit_content(self, fit_content: bool) -> Markdown
pub fn fit_content(self, fit_content: bool) -> Markdown
Sets whether a block takes its content’s width rather than the full width.
Sourcepub fn on_tap_link(
self,
on_tap_link: impl Fn(&mut App, &str, &str) + 'static,
) -> Markdown
pub fn on_tap_link( self, on_tap_link: impl Fn(&mut App, &str, &str) + 'static, ) -> Markdown
Calls on_tap_link with a tapped link’s address and title.
Sourcepub fn image(
self,
image: impl Fn(&mut App, &Image) -> WidgetRef + 'static,
) -> Markdown
pub fn image( self, image: impl Fn(&mut App, &Image) -> WidgetRef + 'static, ) -> Markdown
Builds each image with image.
Sourcepub fn checkbox(
self,
checkbox: impl Fn(&mut App, bool) -> WidgetRef + 'static,
) -> Markdown
pub fn checkbox( self, checkbox: impl Fn(&mut App, bool) -> WidgetRef + 'static, ) -> Markdown
Builds each task item’s checkbox with checkbox.
Trait Implementations§
Source§impl StatelessWidget for Markdown
impl StatelessWidget for Markdown
Source§fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
Describes the part of the user interface represented by this widget. Read more
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Dart’s constructor asserts that relate two or more arguments. Read more
Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Dart’s
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for Markdown
impl !Send for Markdown
impl !Sync for Markdown
impl !UnwindSafe for Markdown
impl Forget for Markdown
impl Freeze for Markdownwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
InternalBitFlags: Freeze,
&'static dyn ColorExtension: Freeze,
*const RcInner<dyn ColorExtension> is !null: Freeze,
PhantomData<RcInner<dyn ColorExtension>>: Freeze,
PhantomData<String>: Freeze,
*const RcInner<Paint> is !null: Freeze,
PhantomData<RcInner<Paint>>: Freeze,
PhantomData<Shadow>: Freeze,
PhantomData<FontFeature>: Freeze,
PhantomData<FontVariation>: Freeze,
*const RcInner<dyn BoxBorder> is !null: Freeze,
PhantomData<RcInner<dyn BoxBorder>>: Freeze,
PhantomData<BoxShadow>: Freeze,
*const RcInner<dyn Gradient> is !null: Freeze,
PhantomData<RcInner<dyn Gradient>>: Freeze,
*const RcInner<dyn TableColumnWidth> is !null: Freeze,
PhantomData<RcInner<dyn TableColumnWidth>>: Freeze,
*const RcInner<dyn Fn(&mut App, &str, &str)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, &str, &str)>>: Freeze,
*const RcInner<dyn Fn(&mut App, &Image) -> Rc<dyn Widget>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, &Image) -> Rc<dyn Widget>>>: Freeze,
*const RcInner<dyn Fn(&mut App, bool) -> Rc<dyn Widget>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, bool) -> Rc<dyn Widget>>>: Freeze,
*const RcInner<dyn Fn(&mut App, &Bullet) -> Rc<dyn Widget>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, &Bullet) -> Rc<dyn Widget>>>: Freeze,
*const RcInner<dyn Fn(&mut App, Option<&str>, &str) -> TextSpan> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, Option<&str>, &str) -> TextSpan>>: Freeze,
NonZero<u32>: Freeze,
&'static ScrollControllerVTable: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
*const RcInner<dyn ScrollPhysics> is !null: Freeze,
PhantomData<RcInner<dyn ScrollPhysics>>: Freeze,
impl Move for Markdown
impl Unpin for Markdownwhere
Rc<dyn Key>: Unpin,
*const u8 is !null: Unpin,
InternalBitFlags: Unpin,
&'static dyn ColorExtension: Unpin,
Rc<dyn ColorExtension>: Unpin,
Rc<Paint>: Unpin,
Rc<dyn BoxBorder>: Unpin,
Rc<dyn Gradient>: Unpin,
Rc<dyn TableColumnWidth>: Unpin,
Rc<dyn Fn(&mut App, &str, &str)>: Unpin,
Rc<dyn Fn(&mut App, &Image) -> Rc<dyn Widget>>: Unpin,
Rc<dyn Fn(&mut App, bool) -> Rc<dyn Widget>>: Unpin,
Rc<dyn Fn(&mut App, &Bullet) -> Rc<dyn Widget>>: Unpin,
Rc<dyn Fn(&mut App, Option<&str>, &str) -> TextSpan>: Unpin,
NonZero<u32>: Unpin,
&'static ScrollControllerVTable: Unpin,
Rc<Keep>: Unpin,
Rc<dyn ScrollPhysics>: Unpin,
impl UnsafeUnpin for Markdownwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
&'static dyn ColorExtension: UnsafeUnpin,
*const RcInner<dyn ColorExtension> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ColorExtension>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const RcInner<Paint> is !null: UnsafeUnpin,
PhantomData<RcInner<Paint>>: UnsafeUnpin,
PhantomData<Shadow>: UnsafeUnpin,
PhantomData<FontFeature>: UnsafeUnpin,
PhantomData<FontVariation>: UnsafeUnpin,
*const RcInner<dyn BoxBorder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn BoxBorder>>: UnsafeUnpin,
PhantomData<BoxShadow>: UnsafeUnpin,
*const RcInner<dyn Gradient> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Gradient>>: UnsafeUnpin,
*const RcInner<dyn TableColumnWidth> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn TableColumnWidth>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, &str, &str)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, &str, &str)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, &Image) -> Rc<dyn Widget>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, &Image) -> Rc<dyn Widget>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, bool) -> Rc<dyn Widget>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, bool) -> Rc<dyn Widget>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, &Bullet) -> Rc<dyn Widget>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, &Bullet) -> Rc<dyn Widget>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, Option<&str>, &str) -> TextSpan> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, Option<&str>, &str) -> TextSpan>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static ScrollControllerVTable: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
*const RcInner<dyn ScrollPhysics> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ScrollPhysics>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
The widget as a tree node, made where this is called: its
creation_location.