SyncInfo.fromJson(Map<String, dynamic> json) : state = SyncState.values[json['state'] ?? 0], currentHeight = json['currentHeight'], targetHeight = json['targetHeight'];