-
-
Save marcossevilla/430aa8a9104ede6d612959836638d963 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:cloud_firestore/cloud_firestore.dart' show DocumentSnapshot; | |
import 'store_item_model.dart'; | |
class StoreItemFirestore extends StoreItemModel { | |
StoreItemFirestore({ | |
@required int id, | |
@required String name, | |
}) : super(id: id, name: name); | |
factory StoreItemFirestore.fromFirestore(DocumentSnapshot doc) { | |
return StoreItemModel.fromJson(doc.data()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment