move num ext padding to widget ext

null_safety
小赖 4 years ago
parent 0c8f130af9
commit 777c2496d7

@ -11,11 +11,6 @@ extension NumExt on num {
/// EdgeInsets.all /// EdgeInsets.all
EdgeInsets get edge => EdgeInsets.all(this.w); EdgeInsets get edge => EdgeInsets.all(this.w);
EdgeInsets pading(double horizontal, [double vertical]) => EdgeInsets.symmetric(
horizontal: horizontal,
vertical: vertical,
);
/// ///
BorderRadius get radius => BorderRadius.circular(this.w); BorderRadius get radius => BorderRadius.circular(this.w);

@ -3,4 +3,11 @@ import 'package:flutter/material.dart';
extension WidgetExt on Widget { extension WidgetExt on Widget {
Widget get expanded => Expanded(child: this); Widget get expanded => Expanded(child: this);
Widget get center => Center(child: this); Widget get center => Center(child: this);
Widget padding(double horizontal, [double vertical]) => Padding(
padding: EdgeInsets.symmetric(
horizontal: horizontal,
vertical: vertical,
),
child: this,
);
} }

Loading…
Cancel
Save