utils library

Functions

boolValue(DartObject object, String field, [ bool defaultValue ]) → bool
generateImportBlock(BuildStep buildStep, { List<String> libraries, Map<String, String> aliasedLibraries }) → String
Creates library-level import block.
getAnnotation(Element element, Type annotation) DartObject
Return the first annotation for the given element or null if non exists.
getAnnotations(Element element, Type annotation) → Iterable<DartObject>
Return all annotations for the given element.
getClassRef(LibraryElement library, DartObject obj) ClassElement
getJsonFieldAnnotation(FieldElement element) DartObject
hasAnnotation(Element element, Type annotation) → bool
Whether the AST element has an annotation on it.
isNativeJson(String type) → bool
Whether a given type is native in JSON-land.
listClasses(LibraryElement library, Type annotation) → List<ClassElement>
stringValue(DartObject object, String field, [ String defaultValue ]) → String