How to Find Difference Between Two Dates in Flutter

In this blog post, I am showing how to find the difference between two dates in Flutter. We have to make use of the DateTime class and its difference method for this purpose. We can define two dates using the DateTime class as given below. Now, you can get the difference using the difference method … Read more

How to Add and Subtract Days to Dates in Flutter

Adding and subtracting days to a specific date is not straightforward. Here, I am showing you how to add or minus days from a given date in Flutter. We have to make use of the DateTime class for this calculation purpose. We should also use methods such as add or subtract with the Duration class … Read more

How to Convert Current Date and Time to UTC in Flutter

UTC is a widely used standard for representing the time and ensures that your applications are functioning correctly across different time zones. In this tutorial, we will be exploring the process of converting the current date and time to the Coordinated Universal Time (UTC) format in Flutter. We use DateTime class for this purpose. You … Read more

How to Get Current Date in Flutter

Everyone knows the importance of dates and time in mobile apps. In this blog post, let’s learn how to get the current date in Flutter. There’s a DateTime class in Dart that can be used to get the current date and time. This will give us the output as follows. 2020-10-18 20:39:17.566238 Most of the … Read more

How to Create a Horizontal Line in Flutter

Sometimes, you may need to add a horizontal line in your UI. This divider line can help you to separate other components visually. In this flutter tutorial, let’s see how to show a horizontal divider line in Flutter. There are multiple ways to create a horizontal line. Here, we are using the Divider class. A … Read more

How to Create a Slider in Flutter

The slider is an important UI component for mobile apps. It helps users to select a value from a specified range. In this blog post, let’s check how to add a slider component in Flutter. The Slider class is used to create a slider in Flutter. The slider widget has attributes such as min, max, … Read more

How to Limit Characters of TextField in Flutter

TextField is where the user gives input in Flutter-made apps. Most of the time, we may want to limit the number of characters. In this flutter tutorial, let’s check how to limit the characters of TextField. I hope you already know how to add a TextField widget in Flutter, otherwise please go through my blog … Read more

How to Change Keyboard Type of TextField in Flutter

The TextField widget is a very important widget in flutter which lets users give inputs. The input types the user gives can be varied. For example, if you are entering a phone number then you only want to see numbers on your keyboard. In this Flutter tutorial, let’s see how to change keyboard type while … Read more

How to Clear TextField in Flutter

Users always want a clear option with TextField so that they don’t need to back press many times to make the field empty. In this blog post, let’s see how to clear TextField in Flutter. The TextField widget acts as text input in Flutter. If you don’t know how to add a TextField in flutter … Read more