Created
July 3, 2022 19:47
-
-
Save VB10/96e8fe990907048f588d44924f1f9564 to your computer and use it in GitHub Desktop.
Flutter padding class
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
import 'package:flutter/material.dart'; | |
class PagePadding extends EdgeInsets { | |
static const double _normalValue = 10; | |
const PagePadding.horizontalSymmetric() : super.symmetric(horizontal: _normalValue); | |
const PagePadding.verticalSymmetric() : super.symmetric(vertical: _normalValue); | |
const PagePadding.general() : super.only(right: _normalValue, left: _normalValue, top: _normalValue); | |
const PagePadding.all() : super.all(_normalValue); | |
const PagePadding.onlyLeft() : super.only(left: _normalValue); | |
const PagePadding.onlyBottom() : super.only(bottom: _normalValue); | |
const PagePadding.onlyTop() : super.only(top: _normalValue); | |
const PagePadding.onlyRight() : super.only(right: _normalValue); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment