appendHistoryEntry method
Implementation
Future<Map<String, dynamic>> appendHistoryEntry({
required String atSign,
required String type,
required String summary,
Map<String, dynamic> data = const <String, dynamic>{},
}) async {
return mutateState(
atSign: atSign,
mutate: (state) {
final history = _normalizeHistory(state['history']);
history.insert(0, {
'type': type,
'summary': summary,
'createdAtUtc': DateTime.now().toUtc().toIso8601String(),
'data': data,
});
state['history'] = history;
},
);
}