In this article, we will create a custom scrollable app bar with a background image in Flutter. The app bar will shrink as the user scrolls up, and it will include a back button. Below the image, we will display some descriptive text with a “More” or “Less” button to show or hide additional text….
Category: Flutter widgets
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…
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…
Flutter Expandable Drawer Menu Using ExpansionTile
In this tutorial, we will learn how to expand drawer menu using ExpansionTile in flutter. in the earlier tutorial we used ExpansionTile to show content in the body. Now we we will use ExpansionTile in the drawer menu. ExpansionTile children property can take as many children as possible. In the children list we have used…
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…
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 CustomClipper | getClip
Flutter CustomClipper is a great class drawing custom shape or clipping the shape of a widget. Here, we will see how to clip the shape of a star and give it different color. Your own class should extend CustomClipper class. CustomClipper class is used by number widgets. So we may also use it in our…