mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-12 22:24:40 +08:00
Add main_features
This doesn't work as it requires flutter, but I may as well commit it
This commit is contained in:
22
lib/main_features.dart
Normal file
22
lib/main_features.dart
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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,
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user