Selaa lähdekoodia

v0.3.1 release

thl 5 vuotta sitten
vanhempi
commit
8d79720590
7 muutettua tiedostoa jossa 20 lisäystä ja 15 poistoa
  1. 1 1
      CHANGELOG.md
  2. 2 2
      README-EN.md
  3. 2 2
      README.md
  4. 2 0
      lib/flustars.dart
  5. 0 1
      lib/src/image_util.dart
  6. 12 8
      lib/src/ui/my_app_bar.dart
  7. 1 1
      pubspec.yaml

+ 1 - 1
CHANGELOG.md

@@ -1,4 +1,4 @@
-### 0.3.0
+### 0.3.1
 
 * TODO: add ImageUtil, Refactor DirectoryUtil.
 

+ 2 - 2
README-EN.md

@@ -14,13 +14,13 @@ Pub [flustars](https://pub.flutter-io.cn/packages/flustars)
 ### Add dependency
 ```yaml
 dependencies:
-  flustars: ^0.3.0
+  flustars: ^0.3.1
   
 import 'package:flustars/flustars.dart';
 
 or
 
-// git (version 0.3.0)
+// git (version 0.3.1)
 dependencies:
   flustars:
     git:

+ 2 - 2
README.md

@@ -13,13 +13,13 @@ Pub [flustars](https://pub.flutter-io.cn/packages/flustars)
 ### 使用方式:
 ```yaml
 dependencies:
-  flustars: ^0.3.0
+  flustars: ^0.3.1
   
 import 'package:flustars/flustars.dart';
 
 or
 
-// git (version 0.3.0)
+// git (version 0.3.1)
 dependencies:
   flustars:
     git:

+ 2 - 0
lib/flustars.dart

@@ -1,5 +1,7 @@
 library flustars;
 
+export 'package:common_utils/common_utils.dart';
+
 export 'src/ui/my_app_bar.dart';
 
 export 'src/directory_util.dart';

+ 0 - 1
lib/src/image_util.dart

@@ -30,7 +30,6 @@ class ImageUtil {
     Completer<Rect> completer = Completer<Rect>();
     _listener = ImageStreamListener(
       (ImageInfo info, bool synchronousCall) {
-        int now = DateTime.now().millisecondsSinceEpoch;
         _imageStream.removeListener(_listener);
         if (!completer.isCompleted) {
           completer.complete(Rect.fromLTWH(

+ 12 - 8
lib/src/ui/my_app_bar.dart

@@ -531,6 +531,17 @@ class _MyAppBarState extends State<MyAppBar> {
       ),
     );
     if (widget.bottom != null) {
+      Widget _widgetBottom;
+      if (widget.bottomOpacity == 1.0) {
+        _widgetBottom = widget.bottom;
+      } else {
+        _widgetBottom = Opacity(
+          opacity: const Interval(0.25, 1.0, curve: Curves.fastOutSlowIn)
+              .transform(widget.bottomOpacity),
+          child: widget.bottom,
+        );
+      }
+
       appBar = Column(
         mainAxisAlignment: MainAxisAlignment.spaceBetween,
         children: <Widget>[
@@ -540,14 +551,7 @@ class _MyAppBarState extends State<MyAppBar> {
               child: appBar,
             ),
           ),
-          if (widget.bottomOpacity == 1.0)
-            widget.bottom
-          else
-            Opacity(
-              opacity: const Interval(0.25, 1.0, curve: Curves.fastOutSlowIn)
-                  .transform(widget.bottomOpacity),
-              child: widget.bottom,
-            ),
+          _widgetBottom,
         ],
       );
     }

+ 1 - 1
pubspec.yaml

@@ -1,6 +1,6 @@
 name: flustars
 description: Flutter common utils library. SpUtil, ScreenUtil, WidgetUtil, ImageUtil. SharedPreferences Util. Screen info & Screen adaptation. get image size.
-version: 0.3.0
+version: 0.3.1
 author: Sky24n <863764940@qq.com>
 homepage: https://github.com/Sky24n/flustars