diff --git a/lib/ansu_ui.dart b/lib/ansu_ui.dart index fdd1d69..0d1b72d 100644 --- a/lib/ansu_ui.dart +++ b/lib/ansu_ui.dart @@ -21,5 +21,7 @@ export 'text_field/as_search_text_field.dart'; export 'utils/screen_adapter.dart'; +export 'extension/sizedbox_extension.dart'; + //`BOTTOM` is external lib export 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/extension/sizedbox_extension.dart b/lib/extension/sizedbox_extension.dart new file mode 100644 index 0000000..9f2bff3 --- /dev/null +++ b/lib/extension/sizedbox_extension.dart @@ -0,0 +1,9 @@ +import 'package:ansu_ui/ansu_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +extension SizedBoxExt on num { + Widget get wb => SizedBox(width: ScreenUtil().setWidth(this)); + + Widget get hb => SizedBox(height: ScreenUtil().setWidth(this)); +}