thl 6 years ago
parent
commit
d021546507
5 changed files with 7 additions and 4 deletions
  1. 1 1
      CHANGELOG.md
  2. 1 1
      README.md
  3. 3 0
      lib/src/screen_util.dart
  4. 1 1
      lib/src/sp_util.dart
  5. 1 1
      pubspec.yaml

+ 1 - 1
CHANGELOG.md

@@ -1,4 +1,4 @@
-## 0.2.1
+## 0.2.2
 
 * TODO: SpUtil add get default value.
 

+ 1 - 1
README.md

@@ -4,7 +4,7 @@
 ## [flustars] Flutter常用工具类库。主要对第三方库封装,以便于使用。如果你有好的工具类欢迎PR. 
 
 ## [更新说明](./doc/UPDATELOG.md)
-v0.2.1 SpUtil新增get默认值。  
+v0.2.2 SpUtil新增get默认值。  
 SpUtil.getString('key', defValue: '');    
 SpUtil.getInt('key', defValue: 0);
  

+ 3 - 0
lib/src/screen_util.dart

@@ -21,6 +21,9 @@ double _designD = 3.0;
  * h 高
  * density 像素密度
  */
+
+/// 配置设计稿尺寸 屏幕 宽,高,密度。
+/// Configuration design draft size  screen width, height, density.
 void setDesignWHD(double w, double h, {double density: 3.0}) {
   _designW = w;
   _designH = h;

+ 1 - 1
lib/src/sp_util.dart

@@ -90,7 +90,7 @@ class SpUtil {
     return _prefs.setStringList(key, value);
   }
 
-  static dynamic getDynamic(String key, {Object defValue: null}) {
+  static dynamic getDynamic(String key, {Object defValue}) {
     if (_prefs == null) return defValue;
     return _prefs.get(key) ?? defValue;
   }

+ 1 - 1
pubspec.yaml

@@ -1,6 +1,6 @@
 name: flustars
 description: Flutter common utils library. ScreenUtil, SpUtil, WidgetUtil.
-version: 0.2.1
+version: 0.2.2
 author: thl <863764940@qq.com>
 homepage: https://github.com/Sky24n/flustars