Code for Podfile 0 dependencies. It happens because your Podfile is empty. Nothing is there. Put the code below and run pod install. Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.
Month: August 2023
[firebase_auth/invalid-credential] The supplied auth credential is malformed or has expired
This [firebase_auth/invalid-credential] The supplied auth credential is malformed or has expired could be an weird behavior. This could happen due to many reasons. This mostly happen on Android emulator. Solution I have encountered a weird one. This one happened due to emulator. I had to delete the app, reboot the emulator and reinstalled the app….
Flutter GridView 3 ways
There are different ways to achieve grid view results in Flutter. Here I will explain three ways to do grid views in Flutter CustomScrollView, GridView and GridView.builder. First one is using CustomScrollView. CustomScrollView is the most efficient way of doing it. It’s very optimized. If you have chatting app, then CustomScrollView is the best way…
Getx Make Class, Object and Variables Obx
Getx is the most popular state management package of Flutter. One of the way you make your variables, classes or objects observable is via obs. To make any kind of variable or object or class observable, you need to use .obs with object or variable or class. In the picture line 4, we see we…
The following StackOverflowError was thrown building dirty, dependencies: UncontrolledProviderScope
The above error you get in general if you use Riverpod. It’s a widget to provided by Riverpod to prevent unnecessary rebuild of widget for performance optimization. In the context of Riverpod, “dirty” is often used to describe a state that has changed and needs to be updated or rebuilt. The UncontrolledProviderScope is a widget…
Scrollable.of() was called with acontext that does not contain a Scrollable widget
You may get this error regardless you use Getx, BLoC or Riverpod with TypeAheadType plugin. TypeAhead plugin is used for search products or location. With latest Flutter and TypeAhead update you need to use SingleChildScrollView to be wrapped around your TypeAheadType widget. Wrap your TypeAheadField inside SingleChildScrollView and you would be good.
BlocProvider inside a List inject Blocs
Can you use BlocProvider inside a list? yes, you can. You can inject your bloc inside a list using BlocProvider. Here we have buildPage() widget, and it returns a screen or a widget based on the given parameter index. Inside the list you can see that we have two BlocProviders injecting blocs like SearchBlocs and…
Flutter AppBar with PreferredSize | Bottom Text or Line
Flutter PreferredSize() widget could be used in AppBar() to controller the height of the app bar as well as show text or a line on the AppBar. Actually show the text on the bottom of the app bar. Not only a text, you may also show a line Here PreferredSize should be assigned to the…
Get_it dependency injection | BLoC | Cubit
How to inject dependency with Get_it if your dependencies are made of BLoC and Cubit? First you need to create the related BLoC or Cubit for your app and you also have the use cases ready for them. After that you need to create an instance of get_it and create a function called init(). Inside…
Flutter onGenerateRoute
Flutter onGenerateRoute is alternative for routes property of MaterialApp and it’s an alternative for using any plugins for route. Not only that, it also works as a middleware for routes. In general when we use routes property we assign a map or routes to it. It works with pushNamed or named route. See that we…