validate method
Generates errors that would only be appropriate for this GeneratorAdapter.
For example, if a certain feature isn't implemented in a GeneratorAdapter yet.
Implementation
@override
List<Error> validate(PigeonOptions options, Root root) {
final List<Error> errors = <Error>[];
// TODO(tarrinneal): Remove once overflow class is added to gobject generator.
// https://github.com/flutter/flutter/issues/152916
if (root.classes.length + root.enums.length > totalCustomCodecKeysAllowed) {
errors.add(Error(
message:
'GObject generator does not yet support more than $totalCustomCodecKeysAllowed custom types.'));
}
return errors;
}