Format code

This commit is contained in:
2026-02-06 16:52:00 +01:00
parent 0fdf56c084
commit a70c634d35
2 changed files with 26 additions and 30 deletions

View File

@@ -30,19 +30,19 @@ class Change {
/// Serializes this change to a map for storage.
Map<String, dynamic> toMap() => {
'type': type.index,
'sheetUuid': sheetUuid,
'value': value,
'createdAt': createdAt.toIso8601String(),
};
'type': type.index,
'sheetUuid': sheetUuid,
'value': value,
'createdAt': createdAt.toIso8601String(),
};
/// Serializes this change to JSON for API requests.
Map<String, dynamic> toJson() => {
'type': type.name,
'sheetUuid': sheetUuid,
'value': value,
'createdAt': createdAt.toIso8601String(),
};
'type': type.name,
'sheetUuid': sheetUuid,
'value': value,
'createdAt': createdAt.toIso8601String(),
};
/// Deserializes a change from a stored map.
///
@@ -91,9 +91,8 @@ class ChangeQueue {
for (final change in _queue) {
final sheet = sheets.firstWhere(
(s) => s.uuid == change.sheetUuid,
orElse: () => throw StateError(
'Sheet with UUID ${change.sheetUuid} not found',
),
orElse: () =>
throw StateError('Sheet with UUID ${change.sheetUuid} not found'),
);
switch (change.type) {