Flutter中的特殊字符

时间:2018-04-27 10:40:16

标签: dart flutter

在下面的例子中,您是否会如此善意地建议如何添加特殊字符(即版权符号而不是(c)):

Widget copyrightText = new Container(
      padding: const EdgeInsets.only(left: 32.0, right: 32.0),
      child: new Text('2018 (c) Author's Name'),
    );

提前致谢!

3 个答案:

答案 0 :(得分:8)

您可以将其添加为unicode

 child: new Text('2018 \u00a9 Author's Name'),

 child: new Text('2018 © Author's Name'),

另见

答案 1 :(得分:2)

只需添加一件事。

Dart / Flutter添加" Runes"的另一个概念这是字符串的整数/ Unicode表示(超出您可以键入的内容)...例如

var myRichRunesMessage = new Runes('2018 \u00a9 Author\'s Name \u{1f60e}');
print(new String.fromCharCodes(myRichRunesMessage));

哪会有这样的东西......

copyright and emoji

非常酷的功能,可以在许多键盘上启用通常不可输入的字符 - 甚至表情符号:-) ...

答案 2 :(得分:1)

要添加任何特殊字符,您可以使用其unicode。

版权标志的unicode是00a9

您可以像这样使用它:(nohup my command 2> /dev/null &)

您可以在here找到任意字符的unicode。