From e9ecd562f569501cc5304fb1478cbcedd2d0a988 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Sun, 30 Jul 2023 00:53:46 +0800 Subject: [PATCH] remove unused code --- lib/src/models/medium.dart | 45 -------------------------------------- 1 file changed, 45 deletions(-) diff --git a/lib/src/models/medium.dart b/lib/src/models/medium.dart index 7e74ae3..419fee0 100644 --- a/lib/src/models/medium.dart +++ b/lib/src/models/medium.dart @@ -41,21 +41,6 @@ class Medium { /// The date at which the photo or video was modified. final DateTime? modifiedDate; - Medium({ - required this.id, - this.filename, - this.title, - this.mediumType, - this.width, - this.height, - this.size, - this.orientation, - this.mimeType, - this.duration = 0, - this.creationDate, - this.modifiedDate, - }); - /// Creates a medium from platform channel protocol. Medium.fromJson(dynamic json) : id = json["id"], @@ -75,36 +60,6 @@ class Medium { ? DateTime.fromMillisecondsSinceEpoch(json['modifiedDate']) : null; - static Medium fromMap(Map map) { - return Medium( - id: map['id'], - filename: map['filename'], - title: map['title'], - mediumType: jsonToMediumType(map['mediumType']), - width: map['width'], - height: map['height'], - orientation: map['orientation'], - mimeType: map["mimeType"], - creationDate: map['creationDate'], - modifiedDate: map['modifiedDate'], - ); - } - - Map toMap() { - return { - "id": this.id, - "filename": this.filename, - "title": this.title, - "mediumType": mediumTypeToJson(this.mediumType), - "height": this.height, - "orientation": this.orientation, - "mimeType": this.mimeType, - "width": this.width, - "creationDate": this.creationDate, - "modifiedDate": this.modifiedDate, - }; - } - /// Get a JPEG thumbnail's data for this medium. Future> getThumbnail({ int? width,