File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import 'package:intl/date_symbol_data_file.dart'
5
5
6
6
import 'package:intl/intl.dart' ;
7
7
import 'package:intl/locale.dart' ;
8
- import 'package:lean_extensions/collection_extensions.dart' ;
9
8
import 'package:test/test.dart' ;
10
9
11
10
import 'rfc_test.dart' ;
@@ -32,7 +31,17 @@ final _locales = availableLocalesForDateFormatting.map((e) => e).toList()
32
31
}
33
32
return false ;
34
33
});
35
- final _localeCodes = _locales.map (Locale .tryParse).whereNotNull ().toList ();
34
+ final _localeCodes = _locales.map (Locale .tryParse).whereIsNotNull ().toList ();
35
+
36
+ /// taken from collection package to avoid deprecation warning and conflict
37
+ /// with dart sdk
38
+ extension _IterableNullableExtension <T extends Object > on Iterable <T ?> {
39
+ Iterable <T > whereIsNotNull () sync * {
40
+ for (final element in this ) {
41
+ if (element != null ) yield element;
42
+ }
43
+ }
44
+ }
36
45
37
46
Future <void > main () async {
38
47
await initializeDateFormatting ();
You can’t perform that action at this time.
0 commit comments