fromSqlite static method
Implementation
static List<Message> fromSqlite(List<Map<String, dynamic>> data) {
List<Message> ret = [];
for (var item in data) {
var msg = {...item};
for (var k in ['media', 'audio', 'article', 'attachment']) {
if (msg[k] != null && msg[k] != "") {
msg[k] = jsonDecode(msg[k]);
}
}
ret.add(Message.fromJson(msg));
}
return ret;
}