toJson method

  1. @override
Map toJson()

Converts to a Map that can be serialised to Yaml or Json

Implementation

@override
Map toJson() {
  return (buildJson
        ..add('name', name)
        ..add('author', author)
        ..add('version', version)
        ..add('homepage', homepage)
        ..add('documentation', documentation)
        ..add('publish_to', publishTo)
        ..add('environment', environment)
        ..add('description', description)
        ..add('dependencies', dependencies)
        ..add('dev_dependencies', devDependencies)
        ..add('dependency_overrides', dependencyOverrides)
        ..add('executables', executables)
        ..addAll(unParsedYaml!))
      .json;
}