Flutter - Firebase Performance and Crashlytics

Author image By Manish Patel  |  Tuesday, June 18, 2019 03:01 PM  |  3 min read  |   1287

Flutter  -  Firebase

If you are a mobile app developer then you might have known what is Firebase. It’s a platform for developing mobile apps owned by Google in 2014. It offers various features like as an ML Kit, and Cloud storage Authentication which are important for developing modern mobile apps. Also, it offers other services which include performance monitoring, Google Analytics, and Crashlytics to guide you enhance the app quality.
This guide is all about how to connect the flutter with Firebase on Mac PCs so that you can make use of the powerful services offered by the API platform in the future endeavors.

Must have a Google account

In order to make use of the Firebase service and the Google Cloud Platform, you will have to own a Google Account. If you don’t have then you will have to register for one. This tutorial is all about how to connect the Flutter app that you have already to the Firebase platform. You might have the hello_world app ready at the end of the tutorial in the simulator and know how to alter the app by changing the main.dart file.

Firebase project – Creating one

In order to use your Flutter app developer with the Firebase, you will have to first make a project or maybe create one.

  1. Visit the Firebase console
  2. Now click the large “Add project” option
  3. Now click the Project name
  4. You have any anything for instance. And the Firebase will append a unique ID to the project name automatically.
  5. Now choose a Cloud Firestore location
  6. Now read and accept the Terms and Conditions
  7. Once done, scroll down and click “Create Project”

The platform might take some time to go through your application. Once completed, then click the continue option to open the overview page of the project you made.

Configuring an iOS app

  1. Launch the setup wizard for iOS in the project overview page
  2. You will now see the setup wizard and add it in the iOS bundle ID. Check whether the register app is lit up then click on it.
  3. Now you will have to download the GoogleService – Info.plist config list and add it to the iOS project root file, then proceed the next.
  4. Just go with the instructions and then add the Firebase SDK and proceed the next
  5. Make the changes needed in the AppDelegate as suggested by the setup wizard then choose next.
  6. Now check the root folder to run the application. After some time, you might see the setup wizard showing that the app has been included to Firebase. Then choose “Continue to the Console” to complete the setup.

Now you have added Firebase to the Flutter app successfully. In spite of having both the flutter and Firebase from Google awesome, it’s actually a great software engineering practice to have choices over the B and C.

How is the app behaving?

Now let’s see the performance.

As per the document, it can analyze the application performance glitches that happen on a user’s device. Use trace to track the performance of certain app parts and go through a summarized view in the Firebase console. Keep up with the application startup time and check the HTTP requests without working on the code.

How to use it?

You will have to define the traces on your own also track network requests

What is a trace?

A trace can record the data between two different performance segments in your application.

How to use it in Flutter?

  1. You can make use of it by initializing tracing
  2. Then you have to start the trace
  3. Then stop it
  4. You can also use your logic in between the traces

Note – this data will be shown in the Firebase Performance Dashboard

Monitoring the network request

  1. Make use of the feature plugin that is available known as BaseClient
  2. Create a class that goes beyond the BaseClient
  3. You will have to overrule the 2nd class method
  4. Create HttpMetric – the URL, Type of Http Request
  5. Begin the Http Metric
  6. Then stop
  7. And complete the snippet

Crashlytics

Crashlytics

Crashlytics is the Firebase’s chief crash. Using the Firebase_crashlytics, it’s possible to integrate it for Flutter.

  1. Integrate it for Android and iOS
  2. Then start the Crashlytics in the app
  3. You will get notifications for the errors by settings
  4. You can check for errors under the Firebase, quality, and Crashlytics

Why Flutter is the future of mobile app development

  1. Powered by Dart
  2. It can run both on iOS and Android
  3. User Interface development
  4. Provides lots of great features and libraries
  5. Backend development

As mentioned the possibilities are endless and practical with flutter so you can create even the tougher app with flutter with ease.

 

Flutter - Firebase Performance and Crashlytics

Contact Us

 

 


Author image

Manish Patel

Manish Patel is a Co-Founder of Concetto Labs, a leading mobile app development company specialized in android and iOS app development. We provide a one-stop solution for all IT related services.

Why Our Client Love Us?

Our integrity and process focuses largely on providing every customer the best recommendations for their respective business. Our clients become recurring customers because we always go beyond their expectations to deliver the best solutions.

about-us-strategies

We brainstorm a lot!

Because brainstorming leads to new thoughts & ideas. We believe in discussing & bridging the gap leading to nicer suggestions & application.

about-us-strategies

Believe in Innovation!

Innovation is like Jugaad. It only comes when you give it a try. We believe that extraordinary things come with innovation which help you stand & lead in the crowd.

about-us-strategies

Creative Developers!

Our developers are always keen to develop creative ideas. There is “NEVER a NO.” They have an eye on the market facts, thus develop in the latest on going environment.

about-us-strategies

Value for Money!

We understand the value of money & thus with a modular approach serve you the best quote for your application & web services. The features we promise, we deliver. #notohiddencosts

Trusted By