This package provides extra padding related widgets.
- Padding Widgets (with shortcut named too)
- Safe Area Padding Widgets (with shortcut named too)
- Alignment Widgets
- Size Widgets
- Positioned Widgets
$ flutter pub add padding_extraThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
padding_extra: {*version}Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it Now in your Dart code, you can use:
import 'package:padding_extra/padding_extra.dart';PaddingAll,PallPaddingHorizontal,PxPaddingVertical,PyPaddingSymmetric,PsymmPaddingTop,PtPaddingLeft,PlPaddingRight,PrPaddingBottom,Pb
Internally, These widgets use SafeArea widget and remove specified padding with MediaQuery.removePadding.
Also, you can pass extra parameter to add extra padding at that direction.
SafeAreaHorizontal,SafeAreaXSafeAreaVertical,SafeAreaYSafeAreaTopSafeAreaLeftSafeAreaRightSafeAreaBottom
FullFullWidth,FullWFullHeight,FullH
TopLeftRightBottomTopLeftTopRightBottomLeftBottomRight
PosTopPosRightPosBottomPosLeftPosTopLeftPosTopRightPosBottomLeftPosBottomRightPosCenter
PaddingAll(
24,
child: _buildRect(context),
),
SafeAreaHorizontal(
child: Container(
color: Colors.yellow,
width: double.infinity,
height: 100,
),
),