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 {
final double iconSize;
@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<CurvedAnimation> animations;
List<CurvedAnimation> _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<BottomNavigationBar> with TickerPro
vsync: this,
)..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(
parent: _controllers[index],
curve: Curves.fastOutSlowIn,
......@@ -221,7 +221,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
// animations such that their resulting flex values will add up to the desired
// value.
void _computeWeight() {
final Iterable<Animation<double>> animating = animations.where(
final Iterable<Animation<double>> animating = _animations.where(
(Animation<double> animation) => _isAnimating(animation)
);
......@@ -253,12 +253,12 @@ class BottomNavigationBarState extends State<BottomNavigationBar> 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<BottomNavigationBar> with TickerPro
return new FractionalOffset(
_xOffset(index),
yOffsetTween.evaluate(animations[index])
yOffsetTween.evaluate(_animations[index])
);
}
......@@ -337,11 +337,11 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
top: new Tween<double>(
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<BottomNavigationBar> 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<double>(
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<BottomNavigationBar> 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<BottomNavigationBar> with TickerPro
top: new Tween<double>(
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<BottomNavigationBar> 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;
......
......@@ -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(
......
......@@ -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,
......
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