wip go 2
This commit is contained in:
parent
2996074838
commit
a012a2e762
12 changed files with 156 additions and 199 deletions
18
lib/models/sync_status.dart
Normal file
18
lib/models/sync_status.dart
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
part "sync_status.freezed.dart";
|
||||
part "sync_status.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class SyncStatus with _$SyncStatus {
|
||||
const factory SyncStatus({
|
||||
required Type type,
|
||||
required int errorCount,
|
||||
required int lastSync,
|
||||
}) = _SyncStatus;
|
||||
|
||||
factory SyncStatus.fromJson(Map<String, Object?> json) =>
|
||||
_$SyncStatusFromJson(json);
|
||||
}
|
||||
|
||||
@JsonEnum(fieldRename: FieldRename.snake)
|
||||
enum Type { ok, waiting, erroring, permanentlyFailed }
|
||||
Loading…
Add table
Add a link
Reference in a new issue