Commit f075cf44 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Make some symbols private (#8731)

These symbols were not intended to be public. Also, remove some bogus dartdocs
for PhysicalModeLayer.
parent a4c58292
...@@ -146,12 +146,12 @@ class BottomNavigationBar extends StatefulWidget { ...@@ -146,12 +146,12 @@ class BottomNavigationBar extends StatefulWidget {
final double iconSize; final double iconSize;
@override @override
BottomNavigationBarState createState() => new BottomNavigationBarState(); _BottomNavigationBarState createState() => new _BottomNavigationBarState();
} }
class BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin { class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin {
List<AnimationController> _controllers; List<AnimationController> _controllers;
List<CurvedAnimation> animations; List<CurvedAnimation> _animations;
double _weight; double _weight;
final Queue<_Circle> _circles = new Queue<_Circle>(); final Queue<_Circle> _circles = new Queue<_Circle>();
Color _backgroundColor; // Last growing circle's color. Color _backgroundColor; // Last growing circle's color.
...@@ -170,7 +170,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -170,7 +170,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
vsync: this, vsync: this,
)..addListener(_rebuild); )..addListener(_rebuild);
}); });
animations = new List<CurvedAnimation>.generate(config.items.length, (int index) { _animations = new List<CurvedAnimation>.generate(config.items.length, (int index) {
return new CurvedAnimation( return new CurvedAnimation(
parent: _controllers[index], parent: _controllers[index],
curve: Curves.fastOutSlowIn, curve: Curves.fastOutSlowIn,
...@@ -221,7 +221,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -221,7 +221,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
// animations such that their resulting flex values will add up to the desired // animations such that their resulting flex values will add up to the desired
// value. // value.
void _computeWeight() { void _computeWeight() {
final Iterable<Animation<double>> animating = animations.where( final Iterable<Animation<double>> animating = _animations.where(
(Animation<double> animation) => _isAnimating(animation) (Animation<double> animation) => _isAnimating(animation)
); );
...@@ -253,12 +253,12 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -253,12 +253,12 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
).fold(0.0, (double sum, double value) => sum + value); ).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. // 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. // 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) { FractionalOffset _circleOffset(int index) {
...@@ -270,7 +270,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -270,7 +270,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
return new FractionalOffset( return new FractionalOffset(
_xOffset(index), _xOffset(index),
yOffsetTween.evaluate(animations[index]) yOffsetTween.evaluate(_animations[index])
); );
} }
...@@ -337,11 +337,11 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -337,11 +337,11 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
top: new Tween<double>( top: new Tween<double>(
begin: 8.0, begin: 8.0,
end: 6.0, end: 6.0,
).evaluate(animations[i]), ).evaluate(_animations[i]),
), ),
child: new IconTheme( child: new IconTheme(
data: new IconThemeData( data: new IconThemeData(
color: colorTween.evaluate(animations[i]), color: colorTween.evaluate(_animations[i]),
size: config.iconSize, size: config.iconSize,
), ),
child: config.items[i].icon, child: config.items[i].icon,
...@@ -356,14 +356,14 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -356,14 +356,14 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
context: context, context: context,
style: new TextStyle( style: new TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: colorTween.evaluate(animations[i]), color: colorTween.evaluate(_animations[i]),
), ),
child: new Transform( child: new Transform(
transform: new Matrix4.diagonal3(new Vector3.all( transform: new Matrix4.diagonal3(new Vector3.all(
new Tween<double>( new Tween<double>(
begin: 0.85, begin: 0.85,
end: 1.0, end: 1.0,
).evaluate(animations[i]), ).evaluate(_animations[i]),
)), )),
alignment: FractionalOffset.bottomCenter, alignment: FractionalOffset.bottomCenter,
child: config.items[i].title, child: config.items[i].title,
...@@ -391,7 +391,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -391,7 +391,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
new Expanded( new Expanded(
// Since Flexible only supports integers, we're using large // Since Flexible only supports integers, we're using large
// numbers in order to simulate floating point flex values. // 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( child: new InkResponse(
onTap: () { onTap: () {
if (config.onTap != null) if (config.onTap != null)
...@@ -407,7 +407,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -407,7 +407,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
top: new Tween<double>( top: new Tween<double>(
begin: 18.0, begin: 18.0,
end: 6.0, end: 6.0,
).evaluate(animations[i]), ).evaluate(_animations[i]),
), ),
child: new IconTheme( child: new IconTheme(
data: new IconThemeData( data: new IconThemeData(
...@@ -423,7 +423,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro ...@@ -423,7 +423,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
child: new Container( child: new Container(
margin: const EdgeInsets.only(bottom: 10.0), margin: const EdgeInsets.only(bottom: 10.0),
child: new FadeTransition( child: new FadeTransition(
opacity: animations[i], opacity: _animations[i],
child: new DefaultTextStyle.merge( child: new DefaultTextStyle.merge(
context: context, context: context,
style: const TextStyle( style: const TextStyle(
...@@ -512,7 +512,7 @@ class _Circle { ...@@ -512,7 +512,7 @@ class _Circle {
controller.forward(); controller.forward();
} }
final BottomNavigationBarState state; final _BottomNavigationBarState state;
final int index; final int index;
final Color color; final Color color;
AnimationController controller; AnimationController controller;
......
...@@ -18,7 +18,7 @@ import 'theme.dart'; ...@@ -18,7 +18,7 @@ import 'theme.dart';
import 'tooltip.dart'; import 'tooltip.dart';
// Minimum logical pixel size of the IconButton. // Minimum logical pixel size of the IconButton.
const double kMinButtonSize = 48.0; const double _kMinButtonSize = 48.0;
/// A material design icon button. /// A material design icon button.
/// ///
...@@ -143,7 +143,7 @@ class IconButton extends StatelessWidget { ...@@ -143,7 +143,7 @@ class IconButton extends StatelessWidget {
currentColor = disabledColor ?? Theme.of(context).disabledColor; currentColor = disabledColor ?? Theme.of(context).disabledColor;
Widget result = new ConstrainedBox( Widget result = new ConstrainedBox(
constraints: const BoxConstraints(minWidth: kMinButtonSize, minHeight: kMinButtonSize), constraints: const BoxConstraints(minWidth: _kMinButtonSize, minHeight: _kMinButtonSize),
child: new Padding( child: new Padding(
padding: padding, padding: padding,
child: new SizedBox( child: new SizedBox(
......
...@@ -523,10 +523,6 @@ class BackdropFilterLayer extends ContainerLayer { ...@@ -523,10 +523,6 @@ class BackdropFilterLayer extends ContainerLayer {
} }
class PhysicalModelLayer 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({ PhysicalModelLayer({
@required this.clipRRect, @required this.clipRRect,
@required this.elevation, @required this.elevation,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment