Initial draft
This commit is contained in:
18
lib/dto/scan_response.dart
Normal file
18
lib/dto/scan_response.dart
Normal file
@ -0,0 +1,18 @@
|
||||
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<String, dynamic> json) =>
|
||||
_$ScanResponseDTOFromJson(json);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => _$ScanResponseDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user