mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Remove out dated todos from integration tests with no issue links (#85461)
This commit is contained in:
parent
af42e7d730
commit
32e6de84db
@ -175,8 +175,8 @@ class _GestureTransformableState extends State<GestureTransformable> with Ticker
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the offset of the current widget from the global screen coordinates.
|
// Get the offset of the current widget from the global screen coordinates.
|
||||||
// TODO(justinmc): Protect against calling this during first build.
|
|
||||||
static Offset getOffset(BuildContext context) {
|
static Offset getOffset(BuildContext context) {
|
||||||
|
assert(context.findRenderObject() != null, 'The given context must have a renderObject, such as after the first build has completed.');
|
||||||
final RenderBox renderObject = context.findRenderObject()! as RenderBox;
|
final RenderBox renderObject = context.findRenderObject()! as RenderBox;
|
||||||
return renderObject.localToGlobal(Offset.zero);
|
return renderObject.localToGlobal(Offset.zero);
|
||||||
}
|
}
|
||||||
@ -334,8 +334,6 @@ class _GestureTransformableState extends State<GestureTransformable> with Ticker
|
|||||||
Offset(nextTranslation.dx, nextTranslation.dy),
|
Offset(nextTranslation.dx, nextTranslation.dy),
|
||||||
);
|
);
|
||||||
if (!inBoundaries) {
|
if (!inBoundaries) {
|
||||||
// TODO(justinmc): Instead of canceling translation when it goes out of
|
|
||||||
// bounds, stop translation at boundary.
|
|
||||||
return matrix;
|
return matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import 'package:vector_math/vector_math.dart' show Vector2;
|
|||||||
// Provides calculations for an object moving with inertia and friction using
|
// Provides calculations for an object moving with inertia and friction using
|
||||||
// the equation of motion from physics.
|
// the equation of motion from physics.
|
||||||
// https://en.wikipedia.org/wiki/Equations_of_motion#Constant_translational_acceleration_in_a_straight_line
|
// https://en.wikipedia.org/wiki/Equations_of_motion#Constant_translational_acceleration_in_a_straight_line
|
||||||
// TODO(justinmc): Can this be replaced with friction_simulation.dart?
|
|
||||||
@immutable
|
@immutable
|
||||||
class InertialMotion {
|
class InertialMotion {
|
||||||
const InertialMotion(this._initialVelocity, this._initialPosition);
|
const InertialMotion(this._initialVelocity, this._initialPosition);
|
||||||
@ -30,7 +29,6 @@ class InertialMotion {
|
|||||||
|
|
||||||
// The acceleration opposing the initial velocity in x and y components.
|
// The acceleration opposing the initial velocity in x and y components.
|
||||||
Vector2 get _acceleration {
|
Vector2 get _acceleration {
|
||||||
// TODO(justinmc): Find actual velocity instead of summing?
|
|
||||||
final double velocityTotal = _initialVelocity.pixelsPerSecond.dx.abs()
|
final double velocityTotal = _initialVelocity.pixelsPerSecond.dx.abs()
|
||||||
+ _initialVelocity.pixelsPerSecond.dy.abs();
|
+ _initialVelocity.pixelsPerSecond.dy.abs();
|
||||||
final double vRatioX = _initialVelocity.pixelsPerSecond.dx / velocityTotal;
|
final double vRatioX = _initialVelocity.pixelsPerSecond.dx / velocityTotal;
|
||||||
|
Loading…
Reference in New Issue
Block a user