yaml_writer 2.0.1 yaml_writer: ^2.0.1 copied to clipboard
A library to write YAML documents, supporting Object encoding and 'dart:convert' 'Converter'.
example/yaml_writer_example.dart
import 'package:yaml_writer/yaml_writer.dart';
void main() {
var yamlWriter = YamlWriter();
var yamlDoc = yamlWriter.write({
'name': 'Joe',
'ids': [10, 20, 30],
'desc': 'This is\na multiline\ntext',
'enabled': true,
});
print(yamlDoc);
}
//---------------------
// OUTPUT:
//---------------------
// name: 'Joe'
// ids:
// - 10
// - 20
// - 30
// desc: |-
// This is
// a multiline
// text
// enabled: true
//