Flutter Firebase Firestore withConverter() method provides Map<String, dynamic> data to convert to object and from object Map<String, dynamic>. So with this we convert Map to object and object to Map. Because Firebase Firestore default way storing and retrieving data is Map<String, dynamic>. This is not very efficient and error prone. Look at the example below…
Flutter Getx GetxController or GetxService
You should use GetxController when you want to use data on per open page. If you open the page GetxController will initialize and you will get update data. But if you use GetxService, it will only get initialized once when the app launch first time. And the data would be saved in memory. GetxService may…
Flutter Dropdown Multiselect Checkbox
Flutter Dropdown Multiselect Checkbox
Flutter Getx Get.find() inside Controller
A lot of time, you may use Get.find() inside Getx controller. We need that to reduce bipolerate code. We can do that by creating a static method which refers to the current class. All we have to do it is return Get.find(). We created a class name StorageService and extends GetxService. And inside that we…
Flutter Flip Card 3D Animation
We will do flutter 3d animation of card image using AnimationController, Tween and AnimationStatus. We will do that using stateful class. Inside the class we will override initState() method and declare Here addListener() and addStatusListener() plays very important roles. Without them animation is not dynamic and not updated immediately. Because of this status listener, we…
Flutter Spinning Animation Without Plugin
Let’s learn about flutter spinning animation without plugin. Animation could be scary for beginners. But three simple steps to follow for animation.
Flutter BLoC RepositoryProvider
Flutter BLoC RepositoryProvider is needed when you network call or api request inside from a controller. That means if you have a controller, you should assign it inside RepositoryProvider, then the class would get loaded first. This controller class would hold methods and fields, that’s necessary when you trigger events and load data or pass…
Flutter Global key
Normally, flutter will not use Global Keys. When you create a stateful widget, two object get created: a widget, and it’s state. The idea is that the widget itself will be destroyed at the end of the build (or after it is painted on the screen). Once you initiate the build again (through setState() for…
Flutter Auto-resize TextFields
Here we will learn how to do auto-resize textfields. In general flutter textfields, the text goes up as you type in. But sometimes for better user experience, you don’t want the text to go up automatically. You want them to be visible. Being visible, you may edit the text any time. You should use maxLines…
How to update camera position flutter google map?
Here we will see how to update camera position using flutter google map. First make sure you use GoogleMap() widget and create a google map object in your widget tree. At the same time make sure that, you have created initial value for Camera Position. If you class is stateful class, make sure that you…