Is there a way to get the annotation on a class using Smoke?

Issue

Is there a way to get the annotation on a class using Smoke?

class Anno {
 const Anno();
}

@Anno
class A {
}

void main() {
  var a = new A();
  // how to get the annotation `@Anno` from `a` using the Smoke library
  someMethod(A);
}

var someMethod(Type t) {
  // get the annotation `@Anno` from `t` using the Smoke library
}

Solution

There is not currently any support for reading annotations in Smoke 🙁

You could raise an issue at dartbug.com, though I don’t know whether it’s likely the Polymer team will add functionality not required by Polymer (my case hasn’t had any useful response) 🙁

Answered By – Danny Tuppeny

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *