From 957936a01414d9b66970ed1dc062ce48ae2ce77d Mon Sep 17 00:00:00 2001 From: Trang Nguyen <thi_huyen_trang.nguyen@student.reutlingen-university.de> Date: Fri, 20 Nov 2020 10:36:48 +0100 Subject: [PATCH] KAT-50: delete to patient.dart --- rescueapp/lib/model-patient/patient.dart | 40 ------------------------ 1 file changed, 40 deletions(-) delete mode 100644 rescueapp/lib/model-patient/patient.dart diff --git a/rescueapp/lib/model-patient/patient.dart b/rescueapp/lib/model-patient/patient.dart deleted file mode 100644 index f7ca36f..0000000 --- a/rescueapp/lib/model-patient/patient.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:rescueapp/database/database_provide.dart'; - -class Patient { - int id; - String name; - String birthday; - bool isAmbilatory; - String imagePath; - String category; - - - Patient({this.id, this.name, this.birthday, this.isAmbilatory, this.imagePath, this.category}); -//converts to map - Map<String, dynamic> toMap() { - var map = <String, dynamic>{ - DatabaseProvider.COLUMN_NAME: name, - DatabaseProvider.COLUMN_BIRTHDAY: birthday, - DatabaseProvider.COLUMN_ISAMBILATORY: isAmbilatory ? 1 : 0, - DatabaseProvider.COLUMN_IMAGEPATH: imagePath, - DatabaseProvider.COLUMN_CATEGORIE: category, - - }; - - if (id != null) { - map[DatabaseProvider.COLUMN_ID] = id; - } - - return map; - } - - Patient.fromMap(Map<String, dynamic> map) { - id = map[DatabaseProvider.COLUMN_ID]; - name = map[DatabaseProvider.COLUMN_NAME]; - birthday = map[DatabaseProvider.COLUMN_BIRTHDAY]; - isAmbilatory = map[DatabaseProvider.COLUMN_ISAMBILATORY] == 1; - imagePath = map[DatabaseProvider.COLUMN_IMAGEPATH]; - category = map[DatabaseProvider.COLUMN_CATEGORIE]; - - } -} \ No newline at end of file -- GitLab