flutter RTL syntax error with "package:intl/intl.dart"
3,197
Solution 1
import the namespace as below and use the alias name
import 'package:intl/intl.dart' as intl;
Solution 2
import 'dart:ui' as ui;
..
textDirection: ui.TextDirection.ltr,
![javad bat](https://lh3.googleusercontent.com/-kWG4eNbYgLY/AAAAAAAAAAI/AAAAAAAAAB8/sXNSM2JBSc8/photo.jpg?sz=256)
Author by
javad bat
love to design and develop web component and design interaction simple as it could be
Updated on December 04, 2022Comments
-
javad bat over 1 year
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, ); }, ); }
Element 'TextDirection' from SDK library 'ui.dart' is implicitly hidden by 'intl.dart'. any solution for this problem?