Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我用flutter写一篇长文章时,我怎样才能写出一段?_Flutter_Text_Widget - Fatal编程技术网

当我用flutter写一篇长文章时,我怎样才能写出一段?

当我用flutter写一篇长文章时,我怎样才能写出一段?,flutter,text,widget,Flutter,Text,Widget,如何在文本窗口小部件中创建颤振中的段落? 这只是一篇很长的文字,看起来很愚蠢 我想要的是: 你好, 你好吗 它是什么: 你好,你好吗?对段落使用\n,如:Text('Hello,\n\n你好吗?')另一种方法,使用RichText: RichText( text: TextSpan( text: 'Hello,', style: TextStyle(color: Colors.black, fontSize: 18.0), childr

如何在文本窗口小部件中创建颤振中的段落? 这只是一篇很长的文字,看起来很愚蠢

我想要的是: 你好,

你好吗

它是什么:


你好,你好吗?

对段落使用
\n
,如:
Text('Hello,\n\n你好吗?')
另一种方法,使用RichText:

RichText(
      text: TextSpan(
        text: 'Hello,',
        style: TextStyle(color: Colors.black, fontSize: 18.0),
        children: <TextSpan>[
          TextSpan(
            text: 'how are you?',
            style: TextStyle(fontWeight: FontWeight.bold, )
          ),
        ],
      ),
    )
RichText(
text:TextSpan(
短信:“你好,”,
样式:TextStyle(颜色:Colors.black,fontSize:18.0),
儿童:[
TextSpan(
文字:“你好吗?”,
样式:TextStyle(fontWeight:fontWeight.bold,)
),
],
),
)

ohh这太简单了,为什么我不在谷歌上找到这么简单的东西呢?很高兴我能帮忙!请考虑接受我的回答,以获得我的声誉;我在这里还是个新手…我喜欢它,我怎么能接受它呢?在你可以选择的两个箭头旁边应该有复选标记,如中所示。