Export public API types from animation and physics libraries (#106757)
diff --git a/dev/benchmarks/microbenchmarks/lib/geometry/curves_bench.dart b/dev/benchmarks/microbenchmarks/lib/geometry/curves_bench.dart
index b0871a3..298e94e 100644
--- a/dev/benchmarks/microbenchmarks/lib/geometry/curves_bench.dart
+++ b/dev/benchmarks/microbenchmarks/lib/geometry/curves_bench.dart
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'dart:ui';
import 'package:flutter/animation.dart';
import '../common.dart';
diff --git a/packages/flutter/lib/animation.dart b/packages/flutter/lib/animation.dart
index 88bec71..24255db 100644
--- a/packages/flutter/lib/animation.dart
+++ b/packages/flutter/lib/animation.dart
@@ -160,6 +160,9 @@
/// explicit [Animation] to animate their properties.
library animation;
+// AnimationController can throw TickerCanceled
+export 'package:flutter/scheduler.dart' show TickerCanceled;
+
export 'src/animation/animation.dart';
export 'src/animation/animation_controller.dart';
export 'src/animation/animations.dart';
diff --git a/packages/flutter/lib/src/animation/animation.dart b/packages/flutter/lib/src/animation/animation.dart
index 8c91083..a4003e1 100644
--- a/packages/flutter/lib/src/animation/animation.dart
+++ b/packages/flutter/lib/src/animation/animation.dart
@@ -7,6 +7,10 @@
import 'tween.dart';
+export 'dart:ui' show VoidCallback;
+
+export 'tween.dart' show Animatable;
+
// Examples can assume:
// late AnimationController _controller;
diff --git a/packages/flutter/lib/src/animation/animation_controller.dart b/packages/flutter/lib/src/animation/animation_controller.dart
index 6491ac5..da359a0 100644
--- a/packages/flutter/lib/src/animation/animation_controller.dart
+++ b/packages/flutter/lib/src/animation/animation_controller.dart
@@ -14,7 +14,11 @@
import 'curves.dart';
import 'listener_helpers.dart';
-export 'package:flutter/scheduler.dart' show TickerFuture, TickerCanceled;
+export 'package:flutter/physics.dart' show Simulation, SpringDescription;
+export 'package:flutter/scheduler.dart' show TickerFuture, TickerProvider;
+
+export 'animation.dart' show Animation, AnimationStatus;
+export 'curves.dart' show Curve;
// Examples can assume:
// late AnimationController _controller, fadeAnimationController, sizeAnimationController;
diff --git a/packages/flutter/lib/src/animation/animations.dart b/packages/flutter/lib/src/animation/animations.dart
index aab34c4..2d6b600 100644
--- a/packages/flutter/lib/src/animation/animations.dart
+++ b/packages/flutter/lib/src/animation/animations.dart
@@ -11,6 +11,11 @@
import 'curves.dart';
import 'listener_helpers.dart';
+export 'dart:ui' show VoidCallback;
+
+export 'animation.dart' show Animation, AnimationStatus, AnimationStatusListener;
+export 'curves.dart' show Curve;
+
// Examples can assume:
// late AnimationController controller;
diff --git a/packages/flutter/lib/src/animation/curves.dart b/packages/flutter/lib/src/animation/curves.dart
index 2db9676..b6eac1c 100644
--- a/packages/flutter/lib/src/animation/curves.dart
+++ b/packages/flutter/lib/src/animation/curves.dart
@@ -8,6 +8,8 @@
import 'package:flutter/foundation.dart';
+export 'dart:ui' show Offset;
+
/// An abstract class providing an interface for evaluating a parametric curve.
///
/// A parametric curve transforms a parameter (hence the name) `t` along a curve
diff --git a/packages/flutter/lib/src/animation/listener_helpers.dart b/packages/flutter/lib/src/animation/listener_helpers.dart
index 9af288c..acecaa1 100644
--- a/packages/flutter/lib/src/animation/listener_helpers.dart
+++ b/packages/flutter/lib/src/animation/listener_helpers.dart
@@ -7,6 +7,10 @@
import 'animation.dart';
+export 'dart:ui' show VoidCallback;
+
+export 'animation.dart' show AnimationStatus, AnimationStatusListener;
+
/// A mixin that helps listen to another object only when this object has registered listeners.
///
/// This mixin provides implementations of [didRegisterListener] and [didUnregisterListener],
diff --git a/packages/flutter/lib/src/animation/tween.dart b/packages/flutter/lib/src/animation/tween.dart
index 47ee563..87edd7a 100644
--- a/packages/flutter/lib/src/animation/tween.dart
+++ b/packages/flutter/lib/src/animation/tween.dart
@@ -2,13 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'dart:ui' show Color, Size, Rect;
+import 'dart:ui' show Color, Rect, Size;
import 'package:flutter/foundation.dart';
-import 'animation.dart';
import 'animations.dart';
-import 'curves.dart';
+
+export 'dart:ui' show Color, Rect, Size;
+
+export 'animation.dart' show Animation;
+export 'curves.dart' show Curve;
// Examples can assume:
// late Animation<Offset> _animation;
diff --git a/packages/flutter/lib/src/animation/tween_sequence.dart b/packages/flutter/lib/src/animation/tween_sequence.dart
index febf3c5..da9d6e7 100644
--- a/packages/flutter/lib/src/animation/tween_sequence.dart
+++ b/packages/flutter/lib/src/animation/tween_sequence.dart
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
-import 'animation.dart';
import 'tween.dart';
+export 'tween.dart' show Animatable;
+
// Examples can assume:
// late AnimationController myAnimationController;
diff --git a/packages/flutter/lib/src/material/arc.dart b/packages/flutter/lib/src/material/arc.dart
index 384a17e..d194d08 100644
--- a/packages/flutter/lib/src/material/arc.dart
+++ b/packages/flutter/lib/src/material/arc.dart
@@ -7,7 +7,6 @@
import 'package:flutter/animation.dart';
import 'package:flutter/foundation.dart';
-import 'package:flutter/painting.dart';
// How close the begin and end points must be to an axis to be considered
// vertical or horizontal.
diff --git a/packages/flutter/lib/src/physics/clamped_simulation.dart b/packages/flutter/lib/src/physics/clamped_simulation.dart
index 0454e91..943ea80 100644
--- a/packages/flutter/lib/src/physics/clamped_simulation.dart
+++ b/packages/flutter/lib/src/physics/clamped_simulation.dart
@@ -6,6 +6,8 @@
import 'simulation.dart';
+export 'simulation.dart' show Simulation;
+
/// A simulation that applies limits to another simulation.
///
/// The limits are only applied to the other simulation's outputs. For example,
diff --git a/packages/flutter/lib/src/physics/friction_simulation.dart b/packages/flutter/lib/src/physics/friction_simulation.dart
index b47e4c9..b2f1f98 100644
--- a/packages/flutter/lib/src/physics/friction_simulation.dart
+++ b/packages/flutter/lib/src/physics/friction_simulation.dart
@@ -7,7 +7,8 @@
import 'package:flutter/foundation.dart';
import 'simulation.dart';
-import 'tolerance.dart';
+
+export 'tolerance.dart' show Tolerance;
/// A simulation that applies a drag to slow a particle down.
///
diff --git a/packages/flutter/lib/src/physics/simulation.dart b/packages/flutter/lib/src/physics/simulation.dart
index fc67321..adc61f5 100644
--- a/packages/flutter/lib/src/physics/simulation.dart
+++ b/packages/flutter/lib/src/physics/simulation.dart
@@ -6,6 +6,8 @@
import 'tolerance.dart';
+export 'tolerance.dart' show Tolerance;
+
/// The base class for all simulations.
///
/// A simulation models an object, in a one-dimensional space, on which particular
diff --git a/packages/flutter/lib/src/physics/spring_simulation.dart b/packages/flutter/lib/src/physics/spring_simulation.dart
index f3063f9..9080310 100644
--- a/packages/flutter/lib/src/physics/spring_simulation.dart
+++ b/packages/flutter/lib/src/physics/spring_simulation.dart
@@ -9,6 +9,8 @@
import 'simulation.dart';
import 'utils.dart';
+export 'tolerance.dart' show Tolerance;
+
/// Structure that describes a spring's constants.
///
/// Used to configure a [SpringSimulation].
diff --git a/packages/flutter/lib/src/rendering/animated_size.dart b/packages/flutter/lib/src/rendering/animated_size.dart
index 831b41b..500d6bb 100644
--- a/packages/flutter/lib/src/rendering/animated_size.dart
+++ b/packages/flutter/lib/src/rendering/animated_size.dart
@@ -4,7 +4,6 @@
import 'package:flutter/animation.dart';
import 'package:flutter/foundation.dart';
-import 'package:flutter/scheduler.dart';
import 'box.dart';
import 'layer.dart';
diff --git a/packages/flutter/lib/src/widgets/scroll_activity.dart b/packages/flutter/lib/src/widgets/scroll_activity.dart
index 0073978..9ce7ecd 100644
--- a/packages/flutter/lib/src/widgets/scroll_activity.dart
+++ b/packages/flutter/lib/src/widgets/scroll_activity.dart
@@ -7,9 +7,7 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
-import 'package:flutter/physics.dart';
import 'package:flutter/rendering.dart';
-import 'package:flutter/scheduler.dart';
import 'basic.dart';
import 'framework.dart';
diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart
index 8cba237..1432f0c 100644
--- a/packages/flutter/test/material/tabs_test.dart
+++ b/packages/flutter/test/material/tabs_test.dart
@@ -4,7 +4,6 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
-import 'package:flutter/physics.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';