type_resolver 0.1.0 copy "type_resolver: ^0.1.0" to clipboard
type_resolver: ^0.1.0 copied to clipboard

outdated

TypeResolver provides Type and String with the ability to ultimately resolve to an instance or Type.version: 1.0.0

TypeResolver #

TypeResolver provides Type and String with the ability to ultimately resolve to an instance or Type.

Usage #

Annotate class that need to resolve with @TypeResolvable

@TypeResolvable()
class Animal {}

Remember to initialize at main function

void main() {
  initializeTypeResolver();
}

Resolve String to Type

void fn() {
  TypeResolver.parseTypeFromTypeString("Animal");
}

Resolve Type to instance

void fn() {
  TypeResolver.createInstanceFromType(Animal);
}

Resolve String to instance

void fn() {
  TypeResolver.createInstanceFromTypeString("Animal");
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

TypeResolver provides Type and String with the ability to ultimately resolve to an instance or Type.version: 1.0.0

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, build, exporter, glob, source_gen

More

Packages that depend on type_resolver