demo_hive/lib/data/model/reminder_model.dart

21 lines
497 B
Dart
Raw Normal View History

2021-06-28 11:01:00 +00:00
import 'package:demo_hive/domain/entity/reminder.dart';
class ReminderModel extends ReminderEntity{
ReminderModel({String title, String notes}):super(
title: title,
notes: notes,
);
ReminderModel.fromJson(Map<String,dynamic>map) {
this.title= map['title'];
this.notes = map['notes'];
}
Map<String,dynamic> toJson(){
final Map<String,dynamic>data = Map<String,dynamic>();
data['title'] = this.title;
data['notes'] = this.notes;
return data;
}
}