toYaml method
Returns the YAML-formatted source, using name
as a key, for writing into
a pubspec 'dependencies' section.
Implementation
@override
String toYaml({required String name}) {
var buffer = StringBuffer()
..writeln(' $name:')
..writeln(' git:')
..writeln(' url: $_url');
if (_ref != null) {
buffer.writeln(' ref: $_ref');
}
if (_path != null) {
buffer.writeln(' path: $_path');
}
return buffer.toString();
}