fluttercandies / extended_text

A powerful extended official text for Flutter, which supports Speical Text(Image,@somebody), Custom Background, Custom overFlow, Text Selection.
MIT License
664 stars 134 forks source link

使用新版本的包,在rich里放置widgetSpan和overflowWidget导致显示异常 #86

Closed shetz163 closed 3 years ago

shetz163 commented 4 years ago

在0.7.1的版本下是可以使用的 但更新到了4.0之后显示出现了异常

异常图片

代码段如下

Scaffold(
    appBar: AppBar(title: Text('widget.title')),
      body: ExtendedText.rich(
        TextSpan(
          children: [
            for (var item in List.generate(100, (index) => index))
              WidgetSpan(
                child: Container(
                  child: Text("汉字              "),
                  color: Colors.grey,
                ),
              ),
          ],
        ),
        maxLines: 1,
        overflow: TextOverflow.visible,
        // overflowWidget: TextOverflowWidget(child: Text('查看更多')),
      ),
    );
zmtzawqlp commented 4 years ago

什么叫显示异常??

shetz163 commented 4 years ago

加入了overflowWidget之后 , textspan里的widgetspan 显示的是空白