李卓原

change name to spMax,spMin

1 # 5.6.1 1 # 5.6.1
2 2
3 -- add smx => max(toDouble(), sp) , for example: 12.smx 3 +- add spMax => max(toDouble(), sp), and spMin, for example: 12.spMax
4 4
5 # 5.6.0 5 # 5.6.0
6 6
@@ -20,9 +20,12 @@ extension SizeExtension on num { @@ -20,9 +20,12 @@ extension SizeExtension on num {
20 ///smart size : it check your value - if it is bigger than your value it will set your value 20 ///smart size : it check your value - if it is bigger than your value it will set your value
21 ///for example, you have set 16.sm() , if for your screen 16.sp() is bigger than 16 , then it will set 16 not 16.sp() 21 ///for example, you have set 16.sm() , if for your screen 16.sp() is bigger than 16 , then it will set 16 not 16.sp()
22 ///I think that it is good for save size balance on big sizes of screen 22 ///I think that it is good for save size balance on big sizes of screen
  23 + double get spMin => min(toDouble(), sp);
  24 +
  25 + @Deprecated('use spMin instead')
23 double get sm => min(toDouble(), sp); 26 double get sm => min(toDouble(), sp);
24 27
25 - double get smx => max(toDouble(), sp); 28 + double get spMax => max(toDouble(), sp);
26 29
27 ///屏幕宽度的倍数 30 ///屏幕宽度的倍数
28 ///Multiple of screen width 31 ///Multiple of screen width