ProviderSerializableGenerator<Config> constructor
ProviderSerializableGenerator<Config> (
- Element element,
- ConstantReader reader, {
- required String configKey,
Implementation
ProviderSerializableGenerator(
this.element,
this.reader, {
required this.configKey,
}) {
/// Verify the annotated element is a [ClassElement], otherwise throw
if (element is! ClassElement) {
final name = element.name;
throw InvalidGenerationSourceError(
'Generator cannot target `$name`.',
todo: 'Please supply a proper class element instead of `$name`.',
element: element,
);
}
}