Erweiterungen
This commit is contained in:
1 parent
75787d51ff
commit
279f6cb868
5 files changed
+57
-2
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/log_entry.dart';
|
||||
|
||||
part 'device_log.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class DeviceLog {
|
||||
late List<LogEntry> entries;
|
||||
|
||||
DeviceLog();
|
||||
|
||||
Map<String, dynamic> toJson() => _$DeviceLogToJson(this);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'device_log.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
DeviceLog _$DeviceLogFromJson(Map<String, dynamic> json) => DeviceLog()
|
||||
..entries = (json['entries'] as List<dynamic>)
|
||||
.map((e) => LogEntry.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
|
||||
Map<String, dynamic> _$DeviceLogToJson(DeviceLog instance) => <String, dynamic>{
|
||||
'entries': instance.entries,
|
||||
};
|
||||
Reference in new issue
Block a user