Skip to main content

The hassle of firebase in flutter

I recently did a firebase integration in flutter to enable cloud messaging services in my app.


I guess you all know what it means.


The power of customized, fast notifications in my flutter app.


I thought being firebase and being flutter has its own perks (since both is backed by Google).

But in reality it's not that easy.



I wanted to integrate androidX support inside my android folder for the flutter app to work.



Well the official doc of integrating firebase to flutter is good(https://firebase.google.com/docs/flutter/setup), but it does not provide you with the full details though.


Apart from the steps described in this doc. I followed some more steps to achieve what I was looking for.


In the app level build.gradle file,

under the dependencies section,

i added the following


implementation 'androidx.multidex:multidex:2.0.0'


then the 2 lines which includes androidTestImplementation under dependencies section is changed to the following.


androidTestImplementation 'com.androidx.support.test:runner:1.1.0'

androidTestImplementation 'com.androidx.support.test.espresso:espresso-core:3.1.0'


Note the androix  here.


Once that is finished under the defaultConfig section please include the following;

multiDexEnabled true


And also change the minSdkVersion from 16 to 21.


Next, go to the gradle.properties file and add the below lines of code


android.useAndroidX=true

android.enableJetifier=true


Once all these steps are done, I think you will be good to go.


P.S - I am not sure whether this is fixed at a later point of time, but at the timing of this blog, this steps along with the steps mentioned in the above doc is enough for firebase to work smoothly in flutter.



Comments

Popular posts from this blog

AI. Will it replace us or...?

AI!! The buzzword is too hot in the market nowadays. Do you have a technical product or an idea? If it doesn't have AI in it, then chances are it's not going to be sold like hot cakes. That is how things have changed lately. It is no wonder why me and my colleagues at Gelato want to see what AI can do in a niche department like customer support and service. And that is exactly what we did. For a company like Gelato, which is in the market for production-on-demand, there are a lot of customer questions you need to answer. It can be related to products, queries about shipping and pricing, and so on and so forth. Thus, our customer support team is always happy to help with these recurring questions. Let's take one example. A customer asked us, "Do you ship to Norway?" Now that is an easy question to answer if you have the knowledge written somewhere where you could refer to it and say, "Yes! As a matter of fact, we do." Following the same thread, the next q

A smoooooth operation....

 Backward compatibility...   A word that I used to hear when I started my career. You design your APIs with backward compatibility in mind, don't break anything when you are upgrading, think about this, think about that etc. Well, those teachings from my previous mentors didn't go in vain, as I made a fundamental change in how we report problems @  Gelato .    You see recently @  Gelato , the CS (Customer Support) team moved from A ticketing management system to B ticketing management system, which is a monumental task for all the people involved in the CS team. Even though the fundamental concept remains the same the places, the attributes the concepts, and the naming of different attributes all change if you have this transition. And thus it was a big change for the whole company.    After the decision was taken, the first step was to create a well-written transition document, which the good folks at the CS team tackled. Special thanks to  Bartosz ,  Kyle  and  Anastasiia  fo

My experience with the Golden signals

In June 2022, I embarked on a quest for a new job opportunity. Fortunately, this endeavor began just before the global job market experienced a significant downturn. I must admit, I faced my fair share of rejections during this period, but I also had an epiphany. It became evident that there was so much more to learn and understand in the world of technology. Coming from a small service-based company, I had encountered limitations in terms of how much I could learn on the job. However, during interviews and conversations with senior developers, I gained valuable insights into the architectural and technical decisions made by teams in various companies. One such company that left a lasting impression on me was Delivery Hero. Their technical blog posts provided a wealth of information, especially for someone like me, transitioning from a smaller company where projects had minimal daily active users compared to the scale of Delivery Hero. One particular blog post that caught my attention