📜  带有图标的颤动文本 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:49.851000             🧑  作者: Mango

代码示例1
Flutter has WidgetSpan() to add a widget inside the RichText().

Example use:

RichText(
  text: TextSpan(
    children: [
      TextSpan(
        text: "Click ",
      ),
      WidgetSpan(
        child: Icon(Icons.add, size: 14),
      ),
      TextSpan(
        text: " to add",
      ),
    ],
  ),
)

Above code will produce:

Click + to add

You can treat the child of WidgetSpan like the usual widget.