Aplikacja_mobilna/cookbook/lib/data/models/failures/failure_model.dart
2024-02-18 14:30:02 +01:00

26 lines
449 B
Dart

import 'package:cookbook/domain/entities/failures/failure.dart';
class FailureModel {
final String message;
FailureModel({required this.message});
factory FailureModel.fromJson(Map<String, dynamic> json) {
return FailureModel(
message: json['message'],
);
}
Map<String, dynamic> toJson() {
return {
'message': message,
};
}
Failure toEntity() {
return Failure(
message: message,
);
}
}