Last active
February 24, 2023 14:36
-
-
Save amerblackbird/8c33a0ba640b011a5dd295ab38fbc954 to your computer and use it in GitHub Desktop.
Create gap from int or double value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension IntGapExtension on int { | |
/// Vertical gap | |
SizedBox get gv => SizedBox(height: toDouble()); | |
/// Horizontal gap | |
SizedBox get gh => SizedBox(width: toDouble()); | |
} | |
extension DoubleGapExtension on double { | |
/// Vertical gap | |
SizedBox get gv => SizedBox(height: this); | |
/// Horizontal gap | |
SizedBox get gh => SizedBox(width: this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment