first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
/*
* 尺寸兼容类似前端的rem
*/
class Screen {
static double setWidth(double width) {
return ScreenUtil().setWidth(width);
}
static double setHeight(double height) {
return ScreenUtil().setHeight(height);
}
static double setFontSize(double Size) {
return ScreenUtil().setSp(Size);
}
static double width(BuildContext context) {
return MediaQuery.of(context).size.width;
}
static double height(BuildContext context) {
return MediaQuery.of(context).size.height;
}
}