im developing an E-Book app using flutter. How can i setup an online database with (book cover, title, author), and to display it in a grid fetching the book cover, title and author by index using Firebase Firsestore? any other suggestion is welcome.
CodePudding user response:
Use firebase storage to upload the books and their cover. Then save the links to firestore. Therefore your book model should be something like
class Book{
final String bookURL;
final String coverURL;
final String title;
final String author;
.
.
.
.
}
Then retrieve the data from firestore and display it inside a future builder.
Use NetworkImage widget to display the book cover image and Syncfusion Pdf package to display the book content ( if it is in pdf format )
CodePudding user response:
Use Gridview.builder widget to display the books in a gridview