construct method
Moac log objects, returned by Construct from the supplied Map, only check for the keys we need.
Implementation
void construct(Map data) {
if (data[moacResultKey] == null) {
return;
}
if (data[moacResultKey].isNotEmpty) {
if (data[moacResultKey][0] is String) {
// Hashes
_hashes = MoacUtilities.hexToBigIntList(data[moacResultKey]);
} else {
// Logs
_logs = List<MoacLog>();
for (Map log in data[moacResultKey]) {
final Map buildLog = {moacResultKey: log};
final MoacLog entry = MoacLog.fromMap(buildLog);
_logs.add(entry);
}
}
}
}