generateMethod method
GeneratorExtras
generateMethod(
- StringBuffer buffer,
- Objects objects,
- DartGeneratorOptions options
override
Implementation
@override
GeneratorExtras generateMethod(
StringBuffer buffer, Objects objects, DartGeneratorOptions options) {
final reviverName = _reviverName(options.className(objects.name));
buffer.writeFromJson(objects, reviverName, options);
return GeneratorExtras(
const {'dart:convert', 'package:schemake/schemake.dart'},
{reviverName},
(writer) => writer.writeJsonReviver(objects, reviverName, options));
}