Yuto

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.
Python

Python How to define a custom exception with parameters

How can a custom exception be defined in Python? If you check the error message to handle differently depending on the error, a different type of exception should be used. This post shows you some examples.
Other techs

Why does git submodule update not work!!

The following command didn't update the submodule. Huh? git submodule update Neither of the following ones update...
Sponsored links
Other techs

Git How to show the current branch name on the terminal on WSL

Why isn't the current branch name shown on the Terminal? I don't want to run "git status" every time I want to check the current branch. Let's set it up!
Python

Python How to use fixture in pytest to share a function

How can we write when we want to add a function that is executed for all tests, e.g. pre-process and post-process? If you want to know how to use fixture, this post is for you.
Other techs

How to screenshot and record on Linux

Linux user needs to choose a preferred software for everything. I will show how I take a screenshot and record a video ...
JavaScript/TypeScript

How to sort Array if it contains number string and string data in JavaScript

Doesn't Array.sort output as you expected? It's because number is handled as string by default. If you want to sort the array on your needs, you need to write your own sorting logic.
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!
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.
Copied title and URL