import 'package:json_annotation/json_annotation.dart'; part 'scan_response.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class ScanResponseDTO { ScanResponseDTO( {required this.message, required this.succeeded, required this.noteId}); final bool succeeded; final String message; final String? noteId; factory ScanResponseDTO.fromJson(Map json) => _$ScanResponseDTOFromJson(json); Map toJson() => _$ScanResponseDTOToJson(this); }