Last active
March 21, 2020 14:50
-
-
Save ashishrawat2911/3514d4f1065adcaecb8c9bf8223320e3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| List<DocumentSnapshot> documentList; | |
| Future fetchFirstList() async { | |
| try { | |
| documentList = (await Firestore.instance | |
| .collection("movies") | |
| .orderBy("rank") | |
| .limit(10) | |
| .getDocuments()) | |
| .documents; | |
| print(documentList); | |
| movieController.sink.add(documentList); | |
| } on SocketException { | |
| movieController.sink.addError(SocketException("No Internet Connection")); | |
| } catch (e) { | |
| print(e.toString()); | |
| movieController.sink.addError(e); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment