File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
pkgs/ffigen/lib/src/visitor Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,12 @@ class SorterVisitation extends Visitation {
22
22
// all other types.
23
23
static String originalNameSortKey (Binding binding) =>
24
24
'${_typeKey (binding )} ${binding .originalName }' ;
25
- // '~' comes after all valid Dart naming characters.
26
- static const _lowPriorityTypes = {
27
- 'ObjCCategory' : '~ObjCCategory' ,
28
- 'ObjCProtocol' : '~ObjCProtocol' ,
29
- 'ObjCMethod' : '~~ObjCMethod' ,
30
- };
25
+ static const _lowPriorityTypes = {'ObjCCategory' , 'ObjCProtocol' };
31
26
static String _typeKey (Object o) {
32
27
final t = '${o .runtimeType }' ;
33
- return _lowPriorityTypes[t] ?? t;
28
+ // '~' comes after all valid Dart naming characters.
29
+ if (_lowPriorityTypes.contains (t)) return '~$t ' ;
30
+ return t;
34
31
}
35
32
36
33
@override
You can’t perform that action at this time.
0 commit comments