Use Dart 2 camel case constants (#15360)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user