【问题标题】:Emojis on flutter web are not displayedflutter web上的表情符号不显示
【发布时间】:2021-01-13 10:15:04
【问题描述】:

我尝试在 Flutter Web 上使用表情符号,例如 ????,在 Text() 小部件上,但表情符号没有出现,而是出现了一个十字。

截图:

代码:


void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(),
      home: Scaffold(body: Text('This is an emoji ????')),
    );
  }
}

你知道如何在flutter web上解决吗?

【问题讨论】:

  • Flutter web还没有准备好,最好不要用于生产

标签: flutter emoji flutter-web


【解决方案1】:

can try flutter_emoji package : https://pub.dev/packages/flutter_emoji

【讨论】:

    【解决方案2】:

    我认为这个问题已经在 Flutter 2.8 上解决了?

    我只是将表情符号复制粘贴到文本字符串上,如下所示。

       Center(
         child: AppCard(
           child: Text(
             'Hi there ?',
              style: Theme.of(context).textTheme.bodyText1,
           ),
         ),
       ),
    

    【讨论】:

      猜你喜欢
      • 2022-01-16
      • 2021-11-08
      • 2017-12-09
      • 2021-10-11
      • 2020-10-13
      • 2015-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多