Skip to content

Instantly share code, notes, and snippets.

@Imperial-lord
Created March 27, 2021 00:11
Show Gist options
  • Save Imperial-lord/991076aa40028d9dd66a1970f0eb786c to your computer and use it in GitHub Desktop.
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()
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