mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00
23 lines
472 B
Dart
23 lines
472 B
Dart
import 'package:yaml_serializer/yaml_serializer.dart';
|
|
|
|
import 'package:gitjournal/features.dart';
|
|
|
|
// This doesn't work as this requires flutter
|
|
void main() {
|
|
var all = <Map<String, dynamic>>[];
|
|
for (var feature in Features.all) {
|
|
all.add(_toMap(feature));
|
|
}
|
|
|
|
var yaml = toYAML({'features': all});
|
|
print(yaml);
|
|
}
|
|
|
|
Map<String, dynamic> _toMap(Feature feature) {
|
|
return {
|
|
"title": feature.title,
|
|
"date": feature.date,
|
|
"pro": feature.pro,
|
|
};
|
|
}
|