Jonatas

Merge branch 'master' of https://github.com/jonataslaw/getx into master

import 'package:flutter/widgets.dart';
/// add Padding Property to widget
extension WidgetPaddingX on Widget {
Widget paddingAll(double padding) =>
Padding(padding: EdgeInsets.all(padding), child: this);
... ... @@ -24,6 +25,7 @@ extension WidgetPaddingX on Widget {
Widget get paddingZero => Padding(padding: EdgeInsets.zero, child: this);
}
/// Add margin property to widget
extension WidgetMarginX on Widget {
Widget marginAll(double margin) =>
Container(margin: EdgeInsets.all(margin), child: this);
... ... @@ -40,10 +42,15 @@ extension WidgetMarginX on Widget {
double right = 0.0,
double bottom = 0.0,
}) =>
Container(
Padding(
margin: EdgeInsets.only(
top: top, left: left, right: right, bottom: bottom),
child: this);
Widget get marginZero => Container(margin: EdgeInsets.zero, child: this);
}
/// Allows you to insert widgets inside a CustomScrollView
extension WidgetSliverBoxX on Widget {
Widget get sliverBox => SliverToBoxAdapter(child: this);
}
... ...