How to Sort a List by Date in Flutter

Organizing data is an essential aspect of any app. And the sorting is a fundamental operation for this purpose. In this blog post let’s learn how to sort a List by date in Flutter. Assume that you have the following List. Let’s change the above List so that the dates will be sorted in descending … Read more

How to Calculate Age from a Date in Flutter

A signup form seems incomplete without a field for date of birth. In this blog post, let’s learn how to do age calculation from a given date in Flutter. We use the date picker here. The age is calculated when the user selects the date. We use the following function to calculate the age in … Read more

How to Add Date Range Picker in Flutter

Date range pickers are an essential component in most modern apps that allows users to select a range of dates. With Flutter’s intuitive and flexible UI framework, you can easily create a date range picker that fits your app’s design and requirements. In this blog post, let’s learn how to show a date range picker … Read more

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