annotation method

dynamic annotation(
  1. Type macro, {
  2. dynamic e,
})

Implementation

ConstantReader annotation(Type macro, {Element? e}) {
  if (null == e) {
    return ConstantReader(null);
  }
  final meta = TypeChecker.fromRuntime(macro);
  return ConstantReader(meta.firstAnnotationOf(e));
}