Skip to content

Text Span

A representation of Typography.

NikuTextSpan accepts all the props as same as RichText.

dart
// Using namespace
n.TextSpan("");

// Using Niku Prefix
NikuTextSpan("");

Example Usage

dart
n.TextSpan("Rich Text: ")
    ..color = Colors.black
    ..children = [
        n.TextSpan("with "),
        n.TextSpan("underline")..underline,
        n.TextSpan(" and "),
        n.TextSpan("italic")..italic,
    ];

Using extension

dart
"Rich Text: ".n.span
    ..color = Colors.black;

Defination

View Defination on pub.dev