Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:firebase_database/firebase_database.dart';
- class Comment {
- String _fullName;
- String _comment;
- String _photo;
- int _timestamp;
- Comment(this._fullName, this._comment, this._photo, this._timestamp);
- String get fullName => _fullName;
- String get comment => _comment;
- String get photo => _photo;
- int get timestamp => _timestamp;
- Comment.fromSnapshot(DataSnapshot snapshot) {
- _fullName = snapshot.value['fullname'];
- _comment = snapshot.value['comment'];
- _photo = snapshot.value['photo'];
- _timestamp = snapshot.value['timestamp'];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement