Created
March 27, 2021 00:11
-
-
Save Imperial-lord/991076aa40028d9dd66a1970f0eb786c to your computer and use it in GitHub Desktop.
Make a list of all spaces that you might need. This will often eliminate the repeated use of Padding()
This file contains 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
import 'package:flutter/material.dart'; | |
class MySpaces { | |
//vertical gaps | |
static const Widget vSmallestGapInBetween = SizedBox(height: 6); | |
static const Widget vGapInBetween = SizedBox(height: 12); | |
static const Widget vSmallGapInBetween = SizedBox(height: 20); | |
static const Widget vMediumGapInBetween = SizedBox(height: 30); | |
static const Widget vLargeGapInBetween = SizedBox(height: 40); | |
//horizontal gaps | |
static const Widget hSmallestGapInBetween = SizedBox(width: 6); | |
static const Widget hGapInBetween = SizedBox(width: 12); | |
static const Widget hSmallGapInBetween = SizedBox(width: 20); | |
static const Widget hMediumGapInBetween = SizedBox(width: 30); | |
static const Widget hLargeGapInBetween = SizedBox(width: 40); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment