Let’s learn how to create a responsive helper class, in flutter dart. Here we will focus on how to detect Mobile, Desktop or Tablet. In this class, we will create some basic functions and these functions should have access to a context. And based on the context we will if we are on Mobile, Desktop…
Flutter Getx Route Management
If you use Getx for routing, it becomes much easier to manage routing. Just create a new dart class and name it RouteHelper.dart This class will contain a routes list of List<GetPage> type. The variable would be static type. Let’s see the class The above RouteHelper class static properties and methods. You may call both…
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…
Flutter ScaffoldMessenger, showSnackBar and snackBar
Here we will use ScaffoldMessenger, showSnackBar and snackBar together to show a message on button press from the bottom. Flutter ScaffoldMassenger is works for like showing pop up message. ScaffoldMassenger shows, hide and remove snackBar. The MaterialApp widget provides a root ScaffoldMessenger. If you show a SnackBar using the root ScaffoldMessenger, it becomes possible for all descendant Scaffolds to receive the SnackBar. However,…
Flutter Custom Date Converter
Learn about creating a date converter class in flutter. You may use this convert string to date and to different format. It supports below features formatDate dateToDateAndTime dateTimeStringToDateTime dateTimeStringToDate estimatedDate convertStringToDatetime isoStringToLocalDate isoStringToDateTimeString stringToLocalDateOnly localDateToIsoString convertStringToDatetime
Flutter Rating Widget | Star Rating Bar
Let’s learn how to create a star rating widget in flutter. This widget would be responsible to creating stars on the UI. It should be fed the data from the backend. But for now we will use hard coded value. RatingBar class, checks for whether the number of stars are integer or with floating point…
Flutter Not Found Animated Page | TweenAnimationBuilder | Text Animation
Let’s how do we use TweenAnimationBuilder to create not found page with animation. This is actually a text animation. We will do animation to make font bigger. The properties like curve, tween and duration plays an important role about the animation. The property tween value begin and end tell you where to start from and…
Flutter format time to minute and seconds
Let’s how to format a bigger amount of seconds to minutes and seconds. The above function takes any kinds of seconds and converts it minutes and seconds( if more seconds are left over) It also checks for if we want to return just minutes or seconds.
Flutter Custom Image with FadeInImage
It’s easy to customize image and related properties in flutter using FadeInImage.assetNetwork. We created a class called CustomImage and we pass parameters to it. Network image path could be sent as string to this CustomImage class and pass down to FadeInImage.assetNetwork Here Image.placeholder is the default image path. You can mention any image from assets…
Flutter Custom Loader
Here we will see how to create a custom loader in flutter. It’s easy to create one. We just create a stateless class and inside this we may use CircularProgressIndicator. CircularProgressIndicator is inside a Container(). So, we would be able to style as we want. The radius could be anything based on your needs. The…