Posts

Showing posts from October, 2020

How to release your Flutter app

  How to release your Flutter app for iOS   Prerequisites Make sure that you’ve covered Apple’s guidelines for releasing an app on the app store. Have your app’s icons and launch screens ready. Have an Apple Developer account.   Prepare for building Before you can build and release your app on the App Store, you need to set up a place for it using App Store Connect. But first, you need to register a unique bundle ID for your app. This can be done by logging into your Apple Developer account and following these steps: Open the App IDs page. Click + to create a new Bundle ID . Fill out the needed information: App Name, and Explicit App ID. If your app needs specific services, select them and click Continue . Review the details and click Register to finish. Now that we have a unique bundle ID, it’s time to set up a place for your app on the App Store Connect. Log in to the App Store Connect. Select My Apps . Click + then select New App . Fill in your app details and make sure i

Cloud Functions

Image
Cloud Functions     To develop the back-end code for Flutter, we want to separate the code away from our Flutter SDK project folder entirely . Common examples of this back-end code include functions to create a document, delete it and list all available documents. These functions can be stored in the cloud. In this article, I will show you how to write cloud functions on your local machine and deploy them to the cloud.   What can I do with Cloud Functions? Cloud Functions gives developers access to Firebase and Google Cloud events, along with scalable computing power to run code in response to those events. While it's expected that Firebase apps will use Cloud Functions in unique ways to meet their unique requirements, typical use cases might fall into these areas: Notify users when something interesting happens . Perform database sanitization and maintenance . Execute intensive tasks in the cloud instead of in your app . Integrate wit

Firebase Cloud Messaging

Image
  what are push notifications? Push Notifications are a sort of pop-up messaging medium that alerts app users to what's going on in the app. They are also an important way to amplify user engagement in your app. For example, say a user forgets about the app once they have installed it. Then you can use push notifications as a mechanism to regain and retain their interest. Push notifications also help drive traffic to your app. Firebase Cloud Messaging is a service offered by Firebase which lets you send these notifications to your users. You can set up various configurations to send different notifications to different audiences based on time and routine. Because of all these benefits, we are going to use it to send notifications to our Flutter app. Step 1: Create a Flutter Project First, we are going to create a flutter project. For that, we must have the Flutter SDK installed in our system. You can find simple steps for flutter installation in the official documentat

Firebase Hosting

Image
  What is Firebase Hosting? Firebase hosting is a Google hosting service which provides static web content to the user in a secure, fast, free and easy way. Why Firebase Hosting? Most of the web hosting will charge you or will be slow if they are free, also you have to pay extra for getting an SSL certificate to convert your website to a secure one with https. Firebase hosting is free. So, it won’t cost you anymore. It by default provides SSL certificate and offers an impressive speed across multiple geographic locations without the need for a separate CDN on top. Requirements Google Account: I beli e ve you might already have a Gmail account, which is enough. If not create one. Firebase-CLI: Before you can install the Firebase CLI, you will need to install Node.js on your machine. Once you’ve installed NodeJs, you can install the Firebase CLI using npm (the Node Package Manager) by running the following command: npm install -g firebase-tools Domain: This is optional. There ar

Food Delivery App 20 - Implementing Firebase Search and Local Search

  Using the search Delegate SearchDelegate is a pre-defined class inside the material.dart. This class provides us a predesigned search delegate. This class uses the following method to control the various operation to be performed to search for various items. You can read about the method from the following link: buildAction method This method returns the list of widgets to display after the search query in the AppBar. List<Widget> buildActions(BuildContext context) { return [ IconButton( icon: Icon(Icons.close), onPressed: () { close(context, null); }, ), ]; } close(context, null) method is used to close the searchDelegate. buildLeading method Return a leading widget that is displayed before the query. Widget buildLeading(BuildContext context) { return IconButton( icon: Icon(Icons.arrow_back_ios), onPressed: () { close(context, null); }, ); } buildResult method This method is used to

Flutter : StateManagement

Image
    State Management If I have a widget, and I want to change its state from somewhere outside of that widget, either from another widget, or from the network, or a system call.   So let’s build a very simple app. It shows the pie chart, and there is a slider, All we want to do is change the state of the pie chart in response to something happening in the slider. If we look at the very simplified widget tree,we have, basically, only three widgets — Homepage MyChart MySlider And my slider wants to change the state of my chart. So we do something that we call in any declarative framework lifting state up . So we lift state up using — my schedule As soon as slider change — Instead of going to my chart directly, it goes through my schedule. It asks for my schedule and tells it, hey, you know what? I was tapped, and this value changed My schedule is responsible for notifying its listener. So it notifies my chart, hey, something changed, and my chart redraws It then goes down to my sli

Flutter: State Management-2

Image
   The BLoC pattern — ViewModel + Reactiveness ️⚡️ We can use pure dart class as ViewModel and keep the properties as reactive streams. The view layer can add an action in the ViewModel using StreamController’s Sink or Subject from the RxDart package. Those actions can be processed and converted to the View representable property streams in the ViewModel. From the View layer, widgets can react to the ViewModel streams using the StreamBuilder widget. This is the purest reactive form of state management where we can rebuild the necessary widgets by using specific property stream in the StreamBuilder. Following this pattern has additional challenges though. As there will be multiple Sinks for accepting different actions and multiple streams exposed for UI reactivity, it’s very easy to lost tracking the data flow. Let’s see what our rising community has done to solve this problem 😄. 4. The BLoC package The BLoC package mixes the ideology of the BLoC pattern & Reducer

Food Delivery App 17 - Managing PaymentOption

Image
 

Food Delivery App 16 - Placing Order from Cart using Razorpay

Image
    Razor Pay is one of the best payment gateways which provided plugin in a flutter. It was the most straightforward to integrate in-product payment widget that kicked us off with Razorpay yet it was the quick and dependable help for both issue settlement and on-boarding new highlights that have kept us cooperating with them!. Assemble a protected installment arrangement on your site or portable application with Razorpay and get installments from your clients utilizing different installment techniques on your Checkout structure. You can follow installments at each progression of its life cycle and effectively manage them. How to Generate API Key Sign in to your Dashboard with suitable credentials. Select the mode ( Test or Live ) for which you need to create the API key Explore to Settings → API Keys → Generate Key to create a key for the chose mode. N ote : You need to produce separate API Keys for the test and live modes. No cash is deducted from your record in test m