katana_shorten 1.2.0 copy "katana_shorten: ^1.2.0" to clipboard
katana_shorten: ^1.2.0 copied to clipboard

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

Masamune logo

Katana Shorten

Follow on Twitter Maintained with Melos


[YouTube] | [Packages] | [Twitter] | [LinkedIn]


Motivation #

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(
  padding: 16.p, // EdgeInsets.all(16)
  child: Text("text")
);

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

Installation #

Import the following packages

flutter pub add katana_shorten

How to use #

Duration #

The following can be substituted.

100.ms // 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)
100.py // EdgeInsets.symmetric(vertical: 100)
100.pt // EdgeInsets.only(top: 100)
100.pb // EdgeInsets.only(bottom: 100)
100.pl // EdgeInsets.only(left: 100)
100.pr // EdgeInsets.only(right: 100)

Space(SizedBox) #

The following can be substituted.

100.sx // SizedBox(width: 100)
100.sy // SizedBox(height: 100)

Empty() // SizedBox.shrink()
1
likes
0
pub points
5%
popularity

Publisher

verified publishermathru.net

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

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, katana

More

Packages that depend on katana_shorten