File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change
1
+ # 2.1.1
2
+
3
+ - Fixed bug with generic type ids containing ` dynamic ` .
4
+
1
5
# 2.1.0
2
6
3
7
- Ignore whitespaces in type ids.
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class ResolvedType {
70
70
71
71
String get id {
72
72
var nullSuffix = isNullable ? '?' : '' ;
73
- if (args.isNotEmpty && args. any ((t) => t.reversed != dynamic ) ) {
73
+ if (args.isNotEmpty) {
74
74
return '${base .baseId }<${args .map ((r ) => r .id ).join (',' )}>$nullSuffix ' ;
75
75
} else {
76
76
return '$baseId $nullSuffix ' ;
Original file line number Diff line number Diff line change 1
1
name : type_plus
2
2
description : Give your types superpowers and spice up your generics. Make types great again.
3
- version : 2.1.0
3
+ version : 2.1.1
4
4
repository : https://github.com/schultek/type_plus
5
5
issue_tracker : https://github.com/schultek/type_plus/issues
6
6
funding :
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ void main() {
60
60
61
61
test ('type composition works' , () {
62
62
expect (TypePlus .fromId ('Future<int>' ), equals (typeOf <Future <int >>()));
63
+ expect (TypePlus .fromId ('Future<dynamic>' ), equals (typeOf <Future <dynamic >>()));
64
+ expect (TypePlus .fromId ('Future<dynamic>' ).id, equals ('Future<dynamic>' ));
63
65
64
66
expect ((int ).provideTo (< T > () => T .id), equals ('int' ));
65
67
expect (typeOf <Iterable <num >>().provideTo (< T > () => T .args.first), equals (num ));
You can’t perform that action at this time.
0 commit comments