From f075cf4450555878b5274af2e9fd248f3bae566c Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 13 Mar 2017 17:04:14 +0000 Subject: [PATCH] Make some symbols private (#8731) These symbols were not intended to be public. Also, remove some bogus dartdocs for PhysicalModeLayer. --- .../src/material/bottom_navigation_bar.dart | 34 +++++++++---------- .../flutter/lib/src/material/icon_button.dart | 4 +-- packages/flutter/lib/src/rendering/layer.dart | 4 --- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/packages/flutter/lib/src/material/bottom_navigation_bar.dart b/packages/flutter/lib/src/material/bottom_navigation_bar.dart index d745ba71da..e76e86cbfd 100644 --- a/packages/flutter/lib/src/material/bottom_navigation_bar.dart +++ b/packages/flutter/lib/src/material/bottom_navigation_bar.dart @@ -146,12 +146,12 @@ class BottomNavigationBar extends StatefulWidget { final double iconSize; @override - BottomNavigationBarState createState() => new BottomNavigationBarState(); + _BottomNavigationBarState createState() => new _BottomNavigationBarState(); } -class BottomNavigationBarState extends State with TickerProviderStateMixin { +class _BottomNavigationBarState extends State with TickerProviderStateMixin { List _controllers; - List animations; + List _animations; double _weight; final Queue<_Circle> _circles = new Queue<_Circle>(); Color _backgroundColor; // Last growing circle's color. @@ -170,7 +170,7 @@ class BottomNavigationBarState extends State with TickerPro vsync: this, )..addListener(_rebuild); }); - animations = new List.generate(config.items.length, (int index) { + _animations = new List.generate(config.items.length, (int index) { return new CurvedAnimation( parent: _controllers[index], curve: Curves.fastOutSlowIn, @@ -221,7 +221,7 @@ class BottomNavigationBarState extends State with TickerPro // animations such that their resulting flex values will add up to the desired // value. void _computeWeight() { - final Iterable> animating = animations.where( + final Iterable> animating = _animations.where( (Animation animation) => _isAnimating(animation) ); @@ -253,12 +253,12 @@ class BottomNavigationBarState extends State with TickerPro ).fold(0.0, (double sum, double value) => sum + value); } - final double allWeights = weightSum(animations); + final double allWeights = weightSum(_animations); // This weight corresponds to the left edge of the indexed item. - final double leftWeights = weightSum(animations.sublist(0, index)); + final double leftWeights = weightSum(_animations.sublist(0, index)); // Add half of its flex value in order to get the center. - return (leftWeights + _flex(animations[index]) / 2.0) / allWeights; + return (leftWeights + _flex(_animations[index]) / 2.0) / allWeights; } FractionalOffset _circleOffset(int index) { @@ -270,7 +270,7 @@ class BottomNavigationBarState extends State with TickerPro return new FractionalOffset( _xOffset(index), - yOffsetTween.evaluate(animations[index]) + yOffsetTween.evaluate(_animations[index]) ); } @@ -337,11 +337,11 @@ class BottomNavigationBarState extends State with TickerPro top: new Tween( begin: 8.0, end: 6.0, - ).evaluate(animations[i]), + ).evaluate(_animations[i]), ), child: new IconTheme( data: new IconThemeData( - color: colorTween.evaluate(animations[i]), + color: colorTween.evaluate(_animations[i]), size: config.iconSize, ), child: config.items[i].icon, @@ -356,14 +356,14 @@ class BottomNavigationBarState extends State with TickerPro context: context, style: new TextStyle( fontSize: 14.0, - color: colorTween.evaluate(animations[i]), + color: colorTween.evaluate(_animations[i]), ), child: new Transform( transform: new Matrix4.diagonal3(new Vector3.all( new Tween( begin: 0.85, end: 1.0, - ).evaluate(animations[i]), + ).evaluate(_animations[i]), )), alignment: FractionalOffset.bottomCenter, child: config.items[i].title, @@ -391,7 +391,7 @@ class BottomNavigationBarState extends State with TickerPro new Expanded( // Since Flexible only supports integers, we're using large // numbers in order to simulate floating point flex values. - flex: (_flex(animations[i]) * 1000.0).round(), + flex: (_flex(_animations[i]) * 1000.0).round(), child: new InkResponse( onTap: () { if (config.onTap != null) @@ -407,7 +407,7 @@ class BottomNavigationBarState extends State with TickerPro top: new Tween( begin: 18.0, end: 6.0, - ).evaluate(animations[i]), + ).evaluate(_animations[i]), ), child: new IconTheme( data: new IconThemeData( @@ -423,7 +423,7 @@ class BottomNavigationBarState extends State with TickerPro child: new Container( margin: const EdgeInsets.only(bottom: 10.0), child: new FadeTransition( - opacity: animations[i], + opacity: _animations[i], child: new DefaultTextStyle.merge( context: context, style: const TextStyle( @@ -512,7 +512,7 @@ class _Circle { controller.forward(); } - final BottomNavigationBarState state; + final _BottomNavigationBarState state; final int index; final Color color; AnimationController controller; diff --git a/packages/flutter/lib/src/material/icon_button.dart b/packages/flutter/lib/src/material/icon_button.dart index eca207c37d..dafa533647 100644 --- a/packages/flutter/lib/src/material/icon_button.dart +++ b/packages/flutter/lib/src/material/icon_button.dart @@ -18,7 +18,7 @@ import 'theme.dart'; import 'tooltip.dart'; // Minimum logical pixel size of the IconButton. -const double kMinButtonSize = 48.0; +const double _kMinButtonSize = 48.0; /// A material design icon button. /// @@ -143,7 +143,7 @@ class IconButton extends StatelessWidget { currentColor = disabledColor ?? Theme.of(context).disabledColor; Widget result = new ConstrainedBox( - constraints: const BoxConstraints(minWidth: kMinButtonSize, minHeight: kMinButtonSize), + constraints: const BoxConstraints(minWidth: _kMinButtonSize, minHeight: _kMinButtonSize), child: new Padding( padding: padding, child: new SizedBox( diff --git a/packages/flutter/lib/src/rendering/layer.dart b/packages/flutter/lib/src/rendering/layer.dart index 27cabb3125..db69b3d53c 100644 --- a/packages/flutter/lib/src/rendering/layer.dart +++ b/packages/flutter/lib/src/rendering/layer.dart @@ -523,10 +523,6 @@ class BackdropFilterLayer extends ContainerLayer { } class PhysicalModelLayer extends ContainerLayer { - /// Creates a layer with a rounded-rectangular clip. - /// - /// The [clipRRect] property must be non-null before the compositing phase of - /// the pipeline. PhysicalModelLayer({ @required this.clipRRect, @required this.elevation,