@ -82,6 +82,19 @@ class _ExampleNumExtState extends State<ExampleNumExt> {
),
ListTile(title: Text('EdgeInsets')),
ListTile(
leading: Chip(label: Text('.edge')),
title: Text('EdgeInsets Gen'),
subtitle: Text('10.edge'),
trailing: Container(
height: 30.w,
width: 30.w,
color: Colors.red,
padding: 10.edge,
child: Container(color: Colors.green),
],
);
@ -9,6 +9,9 @@ extension NumExt on num {
///获取高 SizedBox
Widget get hb => SizedBox(height: this.w);
///获取 EdgeInsets.all
EdgeInsets get edge => EdgeInsets.all(this.w);
///圆角
BorderRadius get radius => BorderRadius.circular(this.w);