My crude method is
bool isSimpleType(TypeMirror tm) =>
(tm.isTopLevel && tm.owner.simpleName == #dart.core);
The exception is
Unhandled exception:
Uncaught Error: The null object does not have a getter 'simpleName'.
NoSuchMethodError: method not found: 'simpleName'
Receiver: null
Arguments: []
Stack Trace:
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 isSimpleType (package:shelf_bind/src/util/mirror_util.dart:55:32)
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.