import 'package:json_annotation/json_annotation.dart'; part 'connection_lost_message.g.dart'; @JsonSerializable() class ConnectionLostMessage { @JsonKey(name: "connection_lost") late bool connectionLost; ConnectionLostMessage(); factory ConnectionLostMessage.fromJson(Map json) => _$ConnectionLostMessageFromJson(json); Map toJson() => _$ConnectionLostMessageToJson(this); }