Browse Source

remove new

git@h5.yoqi.me 1 year ago
parent
commit
6a98b99c63

+ 2 - 2
lib/framework/uikit/layout/nine_layout.dart

@@ -55,13 +55,13 @@ class NineLayoutDelegate extends FlowDelegate {
       var w = context.getChildSize(i).width + x;
       if (w < totalW) {
         context.paintChild(i,
-            transform: new Matrix4.translationValues(x, y, 0.0));
+            transform: Matrix4.translationValues(x, y, 0.0));
         x += context.getChildSize(i).width + gap;
       } else {
         x = gap;
         y += context.getChildSize(i).height + gap;
         context.paintChild(i,
-            transform: new Matrix4.translationValues(x, y, 0.0));
+            transform: Matrix4.translationValues(x, y, 0.0));
         x += context.getChildSize(i).width + gap;
       }
     }

+ 4 - 4
lib/framework/uikit/refresher/indicator/classic/classic_footer.dart

@@ -253,9 +253,9 @@ class ClassicFooterWidgetState extends State<ClassicFooterWidget>
     // 初始化时间
     _dateTime = DateTime.now();
     // 初始化动画
-    _readyController = new AnimationController(
+    _readyController = AnimationController(
         duration: const Duration(milliseconds: 200), vsync: this);
-    _readyAnimation = new Tween(begin: 0.5, end: 1.0).animate(_readyController)
+    _readyAnimation = Tween(begin: 0.5, end: 1.0).animate(_readyController)
       ..addListener(() {
         setState(() {
           if (_readyAnimation.status != AnimationStatus.dismissed) {
@@ -268,10 +268,10 @@ class ClassicFooterWidgetState extends State<ClassicFooterWidget>
         _readyController.reset();
       }
     });
-    _restoreController = new AnimationController(
+    _restoreController = AnimationController(
         duration: const Duration(milliseconds: 200), vsync: this);
     _restoreAnimation =
-        new Tween(begin: 1.0, end: 0.5).animate(_restoreController)
+        Tween(begin: 1.0, end: 0.5).animate(_restoreController)
           ..addListener(() {
             setState(() {
               if (_restoreAnimation.status != AnimationStatus.dismissed) {

+ 6 - 6
lib/framework/uikit/refresher/indicator/classic/classic_header.dart

@@ -289,9 +289,9 @@ class ClassicHeaderWidgetState extends State<ClassicHeaderWidget>
     // 初始化时间
     _dateTime = DateTime.now();
     // 准备动画
-    _readyController = new AnimationController(
+    _readyController = AnimationController(
         duration: const Duration(milliseconds: 200), vsync: this);
-    _readyAnimation = new Tween(begin: 0.5, end: 1.0).animate(_readyController)
+    _readyAnimation = Tween(begin: 0.5, end: 1.0).animate(_readyController)
       ..addListener(() {
         setState(() {
           if (_readyAnimation.status != AnimationStatus.dismissed) {
@@ -305,10 +305,10 @@ class ClassicHeaderWidgetState extends State<ClassicHeaderWidget>
       }
     });
     // 恢复动画
-    _restoreController = new AnimationController(
+    _restoreController = AnimationController(
         duration: const Duration(milliseconds: 200), vsync: this);
     _restoreAnimation =
-        new Tween(begin: 1.0, end: 0.5).animate(_restoreController)
+        Tween(begin: 1.0, end: 0.5).animate(_restoreController)
           ..addListener(() {
             setState(() {
               if (_restoreAnimation.status != AnimationStatus.dismissed) {
@@ -322,10 +322,10 @@ class ClassicHeaderWidgetState extends State<ClassicHeaderWidget>
       }
     });
     // float收起动画
-    _floatBackController = new AnimationController(
+    _floatBackController = AnimationController(
         duration: const Duration(milliseconds: 300), vsync: this);
     _floatBackAnimation =
-        new Tween(begin: widget.refreshIndicatorExtent, end: 0.0)
+        Tween(begin: widget.refreshIndicatorExtent, end: 0.0)
             .animate(_floatBackController)
               ..addListener(() {
                 setState(() {

+ 1 - 1
lib/framework/uikit/refresher/physics/scroll_physics.dart

@@ -179,7 +179,7 @@ class RefreshPhysics extends ScrollPhysics {
   // 2- Record incoming speed and make rapid flings in the test app.
   // 3- If the scrollables stopped overlapping at any moment, adjust the desired
   //    output value of this function at that input speed.
-  // 4- Feed new input/output set into a power curve fitter. Change function
+  // 4- Feed input/output set into a power curve fitter. Change function
   //    and repeat from 2.
   // 5- Repeat from 2 with medium and slow flings.
   // Momentum build-up function that mimics iOS's scroll speed increase with repeated flings.

+ 4 - 4
lib/framework/uikit/refresher/sliver/sliver_loading.dart

@@ -208,11 +208,11 @@ class _RenderRefreshSliverLoad extends RenderSliverSingleBoxAdapter {
       }
     }
 
-    // The new layout extent this sliver should now have.
+    // The layout extent this sliver should now have.
     final double layoutExtent =
         (_hasLayoutExtent || enableInfiniteLoad ? 1.0 : 0.0) *
             _loadIndicatorExtent;
-    // If the new layoutExtent instructive changed, the SliverGeometry's
+    // If the layoutExtent instructive changed, the SliverGeometry's
     // layoutExtent will take that value (on the next performLayout run). Shift
     // the scroll offset first so it doesn't make the scroll position suddenly jump.
     /*if (layoutExtent != layoutExtentOffsetCompensation) {
@@ -222,7 +222,7 @@ class _RenderRefreshSliverLoad extends RenderSliverSingleBoxAdapter {
       layoutExtentOffsetCompensation = layoutExtent;
       // Return so we don't have to do temporary accounting and adjusting the
       // child's constraints accounting for this one transient frame using a
-      // combination of existing layout extent, new layout extent change and
+      // combination of existing layout extent, layout extent change and
       // the overlap.
       return;
     }*/
@@ -404,7 +404,7 @@ typedef BindLoadIndicator = void Function(
 ///    [RefreshSliverLoadControl] is part of the scrollable and actively occupies
 ///    scrollable space.
 class RefreshSliverLoadControl extends StatefulWidget {
-  /// Create a new refresh control for inserting into a list of slivers.
+  /// Create a refresh control for inserting into a list of slivers.
   ///
   /// The [loadTriggerPullDistance] and [loadIndicatorExtent] arguments
   /// must not be null and must be >= 0.

+ 3 - 3
lib/framework/uikit/refresher/sliver/sliver_refresh.dart

@@ -210,11 +210,11 @@ class _RenderRefreshSliverRefresh extends RenderSliverSingleBoxAdapter {
       }
     }
 
-    // The new layout extent this sliver should now have.
+    // The layout extent this sliver should now have.
     final double layoutExtent =
         (_hasLayoutExtent || enableInfiniteRefresh ? 1.0 : 0.0) *
             _refreshIndicatorExtent;
-    // If the new layoutExtent instructive changed, the SliverGeometry's
+    // If the layoutExtent instructive changed, the SliverGeometry's
     // layoutExtent will take that value (on the next performLayout run). Shift
     // the scroll offset first so it doesn't make the scroll position suddenly jump.
     // 如果Header浮动则不用过渡
@@ -226,7 +226,7 @@ class _RenderRefreshSliverRefresh extends RenderSliverSingleBoxAdapter {
         layoutExtentOffsetCompensation = layoutExtent;
         // Return so we don't have to do temporary accounting and adjusting the
         // child's constraints accounting for this one transient frame using a
-        // combination of existing layout extent, new layout extent change and
+        // combination of existing layout extent, layout extent change and
         // the overlap.
         return;
       }