Skip to main content

Posts

Showing posts from January, 2022

Manage Firebase storage using flutter

Flutter • Firebase • Mobile Development Manage Firebase Storage Using Flutter A practical, end-to-end guide to uploading, monitoring, listing, downloading, and deleting files securely with Cloud Storage for Firebase. Beginner friendly Working code examples Security rules What you will build: a small Flutter file manager that uploads a selected file, shows upload progress, retrieves its download URL, lists files in a user folder, and deletes a selected file. The examples assume Firebase Authentication is enabled and the user is signed in. 1. What is Firebase Storage? Cloud Storage for Firebase stores user-generated content such as profile pictures, receipts, PDFs, videos, and documents. Flutter communicates with the Firebase Storage SDK; the SDK sends the file to a storage bucket, where Firebase Security Rules decide whether the request is allowed. 📱 Flutter app Selects the file → 🔐 Firebase SDK Checks request access ...

Load more pagination in Listview flutter

  Inside Listview use Load more for pagination Add loadmore dependencies inside pubspec.yaml loadmore : ^2.0.1 Now we need to manage page count use loadMoreCount here. initialy loadMore is 0 int loadMoreCount = 0 ; Now use LoadMore Widget inside your body. body: LoadMore ( isFinish: loadMoreCount >= 5 , onLoadMore: _loadMore, child: ListView ( children: <Widget>[ Container ( color: Colors. red , child: Container ( decoration: BoxDecoration ( color: Colors. white , borderRadius: BorderRadius . circular ( 5 )), margin: const EdgeInsets . all ( 8.0 ), padding: const EdgeInsets . only (left: 8.0 ), child: TextField ( decoration: InputDecoration ( fillColor: Colors. red , icon: Icon ( Icons. search , color: Colors. black , ), border: InputBorder. none , ...

Firebase + Flutter integration

Firebase made easy for flutter developer to manage server side APis. Lets start with creating flutter project in firebase console. Follow below link for how to create new project in firebase. Goolge Firebase Setup Once you finish with integrating firebase in flutter follow below steps for development. How my database in firebase looks like check below, Step 1: Add below dependecies inside your pubspec.yaml   cloud_firestore: ^2.2.0   firebase_storage: ^8.1.0 Step 2: Initialize firebase     Firebase.initializeApp(); @override void initState() { // TODO: implement initState print( "init" ); Firebase. initializeApp (); _accessDatabase(); super .initState(); }       Step 3: Start writing insert, update, delete functions of firebase.     Future<List<Product>> getProduct( String categoryId, String subCategoryId) async { List<Product> productList = new List <Product>(); await FirebaseFirestore. instance...