Dart and Flutter

Dart and Flutter

Flutter How to get widget height, width, x, and y position

If the size and position of a widget need to be automatically determined by the Framework, a variable can't be used to know them for another widget. How can we get the width, height, x, and y positions in this case? Use GlobalKey.
Dart and Flutter

Flutter Resize table column by dragging

It's better to make the column width resizable if the text in a DataTable is long. This post explains how to do it without any extra package installation. Watch my sample video to check whether the behavior matches your needs.
Dart and Flutter

Flutter DataTable double tap event on DataRow

DataTable and DataRow don't offer onDoubleTap. How can we implement onDoubleTap event in DataTable widget? You don't have to install another package!
Sponsored links
Dart and Flutter

Dart How to remove duplicates by key-values in object list (Distinct)

list.toSet method doesn't work as expected for an object list to get unique object list? Then, let's add index parameter to the callback of list.where so that we can remove duplicates by key-values.
Dart and Flutter

Implementing Bloom Filter in Dart

Bloom Filter can save memory and improve performance. Let's learn how it's implemented in Dart and how it can be used in an example!
Dart and Flutter

Dart Convert String to int with default value on failure

There are some cases in which a string needs to be converted to int/double. How can we do it in Dart? We can use the...
Dart and Flutter

Flutter Date and Time picker without additional dependencies

There are many packages in pub.dev for date time picker but Flutter offers beautiful date and time pickers. We actually...
Dart and Flutter

Flutter Convert TimeOfDay to 24 hours format

Are you looking for a way to show time in 24 hours format e.g. 13:35? Let's define an extension for TimeOfDay. You can use it everywhere once you define it.
Dart and Flutter

Flutter Apply text style to a target tree

If text style needs to be applied to a Text widget, it's easy to apply but if there are many widgets we don't want to a...
Dart and Flutter

Dart Random number in a range

Dart language offer Random class to generate a random result of boolean, int, and double value. The usage is very simpl...
Copied title and URL