import assert from "assert" ; import { Widget } from "./widget" ; import { Snippet } from "../builder/buildable-tree" ; import { TextDirection } from "../dart-ui" ; import { TextAlign } from "../dart-ui/text-align" ; import { defaultParam , param } from "../decorations/params" ; import { InlineSpan , TextStyle } from "../painting" ; import { TextOverflow } from "../rendering" ; /**
 * https://api.flutter.dev/flutter/widgets/Text-class.html
 */ export class Text extends Widget { @ defaultParam ( ) data : string ; style : TextStyle | Snippet ; textAlign : TextAlign ; constructor ( data , args ? ) { super ( ) ; assert ( data != null , "A non-null String must be provided to a Text widget." ) ; this . data = data ; this . style = args ?. style ; this . textAlign = args ?. textAlign ; } param textSpan param porps static rich ( textSpan , porps ? ) { return new Text ( "__empty__" ) . extendWithFactory ( "rich" ) . overrideArguments ( { __default__ : textSpan , ... porps , } ) ; } }