Masamune logo

Katana Shorten

Follow on Twitter Follow on Threads Maintained with Melos

GitHub Sponsor

[GitHub]( | [YouTube]( | [Packages]( | [Twitter]( | [Threads]( | [LinkedIn]( | [](


Duration and EdgeInsets are classes that are often used to implement Flutter.

Surprisingly, there are many characters to describe, and even though there is auto-completion, it takes a lot of time and effort to type the characters.

Therefore, I have created a package of extensions that can shorten them.

It can be easily written as follows

  padding: 16.p, // EdgeInsets.all(16)
  child: Text("text")

Future.delayed(; // Duration(milliseconds: 100)


Import the following packages

flutter pub add katana_shorten

How to use


The following can be substituted. // Duration(milliseconds: 100)
100.s  // Duration(seconds: 100)
100.m  // Duration(minutes: 100)
100.h  // Duration(hours: 100)
100.d  // Duration(days: 100)

EdgeInsets(Padding / Margin)

The following can be substituted.

100.p  // EdgeInsets.all(100)
100.px // EdgeInsets.symmetric(horizontal: 100) // EdgeInsets.symmetric(vertical: 100) // EdgeInsets.only(top: 100)
100.pb // EdgeInsets.only(bottom: 100) // EdgeInsets.only(left: 100) // EdgeInsets.only(right: 100)


The following can be substituted. // SizedBox(width: 100) // SizedBox(height: 100)

Empty() // SizedBox.shrink()

GitHub Sponsors

Sponsors are always welcome. Thank you for your support!


Flutter package to write Duration, EdgeInsets, etc. in short descriptions. Simple widgets are also provided.