带有"package:intl/intl.dart"的RTL颤抖RTL语法错误; [英] flutter RTL syntax error with "package:intl/intl.dart"

查看:203
本文介绍了带有"package:intl/intl.dart"的RTL颤抖RTL语法错误;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试使用日期选择器来处理Flutter,但我没有找到任何文档或教程,因此我打开了Flutter Gallery项目并尝试复制代码.按照以下代码,我导入"package:intl/intl.dart"库.之后,在main.dart构建函数中:

Hi i recently try to use a date Picker for flutter and i didn't find any Doc or tutorial for it so i open flutter gallery project and try to copy code . as following the code i import "package:intl/intl.dart" library . after that in main.dart build function:

  Widget build(BuildContext context) {
return new MaterialApp(
    title: 'Welcome to Flutter',
    theme: new ThemeData.light(),
    home: new InitiateAppPage(),
    builder: (BuildContext context, Widget child) {
      return new Directionality(
        textDirection: TextDirection.rtl,
        child: child,
      );
    },
    );   }

SDK库'ui.dart'中的元素'TextDirection'被'intl.dart'隐式隐藏.这个问题有什么解决办法吗?

Element 'TextDirection' from SDK library 'ui.dart' is implicitly hidden by 'intl.dart'. any solution for this problem?

推荐答案

按如下所示导入名称空间并使用别名

import the namespace as below and use the alias name

import 'package:intl/intl.dart' as intl;

这篇关于带有"package:intl/intl.dart"的RTL颤抖RTL语法错误;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆