Use Dart 2 camel case constants (#15360)

This commit is contained in:
Jason Simmons
2018-03-12 11:06:32 -07:00
committed by GitHub
parent 33f9afd99c
commit 466d15433f
141 changed files with 708 additions and 708 deletions

View File

@@ -34,10 +34,10 @@ class SectorAppState extends State<SectorApp> {
final double currentTheta = this.currentTheta;
if (currentTheta < kTwoPi) {
double deltaTheta;
if (currentTheta >= kTwoPi - (math.PI * 0.2 + 0.05))
if (currentTheta >= kTwoPi - (math.pi * 0.2 + 0.05))
deltaTheta = kTwoPi - currentTheta;
else
deltaTheta = math.PI * rand.nextDouble() / 5.0 + 0.05;
deltaTheta = math.pi * rand.nextDouble() / 5.0 + 0.05;
wantedSectorSizes.add(deltaTheta);
updateEnabledState();
}

View File

@@ -82,7 +82,7 @@ RenderTransform transformBox;
void rotate(Duration timeStamp) {
timeBase ??= timeStamp;
final double delta = (timeStamp - timeBase).inMicroseconds.toDouble() / Duration.MICROSECONDS_PER_SECOND; // radians
final double delta = (timeStamp - timeBase).inMicroseconds.toDouble() / Duration.microsecondsPerSecond; // radians
transformBox.setIdentity();
transformBox.rotateZ(delta);

View File

@@ -17,7 +17,7 @@ class _SpinningSquareState extends State<SpinningSquare> with SingleTickerProvid
super.initState();
// We use 3600 milliseconds instead of 1800 milliseconds because 0.0 -> 1.0
// represents an entire turn of the square whereas in the other examples
// we used 0.0 -> math.PI, which is only half a turn.
// we used 0.0 -> math.pi, which is only half a turn.
_animation = new AnimationController(
duration: const Duration(milliseconds: 3600),
vsync: this,