diff --git a/lib/common/messages.dart b/lib/common/messages.dart index 981a0ea..3a20ca9 100644 --- a/lib/common/messages.dart +++ b/lib/common/messages.dart @@ -30,4 +30,17 @@ class Course { Course(); String toString() => title.isEmpty ? 'notitle' : title; + + Map toJson() { + Map map = new Map(); + map["title"] = title; + map["time"] = time; + map["day"] = day; + map["kind"] = kind; + map["place"] = place; + map["prof"] = prof; + map["turnin"] = turnin; + map["id"] = id; + return map; + } }