Returns the YAML-formatted source, using name as a key, for writing into a pubspec 'dependencies' section.
name
@override String toYaml({required String name}) => ' $name: $_constraint\n';