demo_hive/lib/data/model/reminder_model.dart

21 lines
497 B
Dart

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;
}
}