From 1a9fbf207e032c9b5b4186aee2b191cc5819ac25 Mon Sep 17 00:00:00 2001 From: niloysikdar <niloysikdar30@gmail.com> Date: Sun, 2 May 2021 03:15:15 +0530 Subject: [PATCH] Added OxygenPostModel --- lib/models/oxygenpost.dart | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/models/oxygenpost.dart diff --git a/lib/models/oxygenpost.dart b/lib/models/oxygenpost.dart new file mode 100644 index 0000000..a35d604 --- /dev/null +++ b/lib/models/oxygenpost.dart @@ -0,0 +1,28 @@ +class OxygenPostModel { + final String title; + final String description; + final String pin; + final String postedOn; + final String postedBy; + final String postedRole; + + OxygenPostModel({ + required this.title, + required this.description, + required this.pin, + required this.postedOn, + required this.postedBy, + required this.postedRole, + }); + + Map<String, dynamic> toMap() { + return { + "title": title, + "description": description, + "pin": pin, + "postedOn": postedOn, + "postedBy": postedBy, + "postedRole": postedRole, + }; + } +}