daily pastebin goal
39%
SHARE
TWEET

comment.dart

alvinvin00 Mar 18th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'package:firebase_database/firebase_database.dart';
  2.  
  3. class Comment {
  4.  
  5.   String _fullName;
  6.   String _comment;
  7.   String _photo;
  8.   int _timestamp;
  9.  
  10.  
  11.   Comment(this._fullName, this._comment, this._photo, this._timestamp);
  12.  
  13.   String get fullName => _fullName;
  14.   String get comment => _comment;
  15.   String get photo => _photo;
  16.   int get timestamp => _timestamp;
  17.  
  18.   Comment.fromSnapshot(DataSnapshot snapshot) {
  19.     _fullName = snapshot.value['fullname'];
  20.     _comment = snapshot.value['comment'];
  21.     _photo = snapshot.value['photo'];
  22.     _timestamp = snapshot.value['timestamp'];
  23.   }
  24.  
  25.  
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top