From 1d20b177e16728f428cf554384d4df1fe707a940 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Wed, 3 Feb 2021 17:09:15 +0100 Subject: [PATCH] Add main_features This doesn't work as it requires flutter, but I may as well commit it --- lib/main_features.dart | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/main_features.dart diff --git a/lib/main_features.dart b/lib/main_features.dart new file mode 100644 index 00000000..e49b1d0e --- /dev/null +++ b/lib/main_features.dart @@ -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 = >[]; + for (var feature in Features.all) { + all.add(_toMap(feature)); + } + + var yaml = toYAML({'features': all}); + print(yaml); +} + +Map _toMap(Feature feature) { + return { + "title": feature.title, + "date": feature.date, + "pro": feature.pro, + }; +}