Placemark is a class that contains information like place’s name, locality, postalCode, country and other properties. You should be using this once you get String address from google map api. You may pass your string address to Placemark() class. The above code should be put inside a controller and the snippet tells you how to use…
Flutter Stack Widget Center Items Alignment
If you have a lot of children inside stack widget, and you all of them to start from the center of the parent widget of stack widget, then you alignment property for it. Inside a parent widget below is our stack widget As you can see everything is messed up here. But we want everything…
Flutter Builder Widget
Flutter Builder widget is helpful and simple to use. There are two cases where you may use builder widget. Here we have an example that takes parent widget’s context and build the UI. Here you see for builder property we are passing a function with context and then returning a widget. This Builder widget helps…
Flutter Circular Progress Indicator Animation BLoC
Here we will carry on from the first part, where we learned how to make a timer app using BLoC pattern. Then in part two we learned how to make a linear progress indicator. In this part we will see how to make circular progress indicator. As usual we will use elapsed time to do…
Flutter Firebase Google Auth Repository
Learn how to create flutter firebase google auth repository. First we wanna have bunch of methods, that will help us to work with google firebase login and logout. Here we included singUp, singIn, singInWithGoogle and singOut method. We need to create a class called AuthRepository. First of all we get a FirebaseAuth.instance object. We will…
How to Stop a Timer in Flutter BLoC
It may sound tricky to stop a timer app in bloc. In fact it’s easy. First you have to understand why your BLoC started to run the timer app? It’s because you triggered an event. That event emitted a state, and because of that state we were able to start the timer. First we emitted…
Flutter Blink Text Widget
Let’s learn how to make a blink text widget in Flutter. To make a blink text we need a stateful class, Timer.periodic() and some strings. First, we created a _timer object using Timer.periodic() Timer.periodic() toggles a boolean named _show in every 500 milliseconds, based on the boolean we show or hide the text. The actual…
Flutter Custom Button Widget
We will create a custom button which will take string, icon, onPress event and fontSize. But our will have default values for string, icon, onPress event and fontSize.
Flutter Custom Divider
Let’s learn how to make a custom divider using Flex, List.generate() and LayoutBuilder() in flutter. We will wrap everything inside LayoutBuilder() and it has builder property. Inside LayoutBuilder‘s builder property we will return Flex and inside Flex we will return List.generate(). We will create a class named CustomDivider() and it will named optional parameters. The…
Flutter Create TextStyle Class with Roboto Font
We will create class for Roboto font family. Just simple create a dart class name styles.dart and save the below code. Each of the TextStyle class returns an TextStyle object. So for Text() widget style you can call any of them based on your needs. If you wanna style your text like The above line…