Display list of items from Cloud Firestore(Firebase)

Create a new dart file in lib : recipes.dart Create a stateless widget inside the above file

Return a Scaffold with an AppBar from the build function Add a StreamBuilder to the body of the Scaffold

Provide the reference of the firestore Collection named ‘Recipes’ to the stream …

Setup Firebase with a Flutter app

Add Firebase to your Flutter app Create a Firebase project Register your app with Firebase Create a Firebase android app inside the Firebase project Add apps’s package name Add app nickname Add SHA-1 fingerprint ( cd android && ./gradlew signingReport ) Add a Firebase configuration file Download the google_services.json file …

Flutter: Create a simple splash screen for Android

The Android system takes some decent amount of time to initialize the app’s processes. In case of an app created with Flutter there is additional initialization work involved for the Flutter engine to start. So the following two events occur before the user can the first screen of the app: …

Flutter: How to Build Intro Slider for your App

Create a new Flutter project Create a new stateful widget MyApp in main.dart Create a new stateful widget IntroSlider Create a new Widget EachPage Create an Indicator widget for the PageView Create a new Futter project, remove the existing code of the MyApp widget, and create a new stateless widget …

The problem that ViewModel solves

Let me start with the truth – “ViewModel is a choice , not a compulsion” . You can use any architecture that works for you , and probably you have one ( if you don’t then please have one as bloating your UI components is the worst practice ) . …

Leaking memory from ViewModel

In this post we are going to explore some of the problems that can be solved by using LiveData .  A ViewModel must never reference a view, Lifecycle, or any class that may hold a reference to the activity context.  A ViewModel lives longer than an Activity or a Fragment …

Android alert dialog using Kotlin

During the flow of any app we often need to prompt the user to make some decision e.g. Deleting a file , posting comment etc . Below is the most simple way to show a promt . Here we are using AlertDialog to show a single button dialog , we …