Skip to content

Commit de55eec

Browse files
authored
Export public API types from animation and physics libraries (#106757)
1 parent 4158a27 commit de55eec

17 files changed

+39
-13
lines changed

dev/benchmarks/microbenchmarks/lib/geometry/curves_bench.dart

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:ui';
65
import 'package:flutter/animation.dart';
76

87
import '../common.dart';

packages/flutter/lib/animation.dart

+3
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@
160160
/// explicit [Animation] to animate their properties.
161161
library animation;
162162

163+
// AnimationController can throw TickerCanceled
164+
export 'package:flutter/scheduler.dart' show TickerCanceled;
165+
163166
export 'src/animation/animation.dart';
164167
export 'src/animation/animation_controller.dart';
165168
export 'src/animation/animations.dart';

packages/flutter/lib/src/animation/animation.dart

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import 'package:flutter/foundation.dart';
77

88
import 'tween.dart';
99

10+
export 'dart:ui' show VoidCallback;
11+
12+
export 'tween.dart' show Animatable;
13+
1014
// Examples can assume:
1115
// late AnimationController _controller;
1216

packages/flutter/lib/src/animation/animation_controller.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import 'animation.dart';
1414
import 'curves.dart';
1515
import 'listener_helpers.dart';
1616

17-
export 'package:flutter/scheduler.dart' show TickerFuture, TickerCanceled;
17+
export 'package:flutter/physics.dart' show Simulation, SpringDescription;
18+
export 'package:flutter/scheduler.dart' show TickerFuture, TickerProvider;
19+
20+
export 'animation.dart' show Animation, AnimationStatus;
21+
export 'curves.dart' show Curve;
1822

1923
// Examples can assume:
2024
// late AnimationController _controller, fadeAnimationController, sizeAnimationController;

packages/flutter/lib/src/animation/animations.dart

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import 'animation.dart';
1111
import 'curves.dart';
1212
import 'listener_helpers.dart';
1313

14+
export 'dart:ui' show VoidCallback;
15+
16+
export 'animation.dart' show Animation, AnimationStatus, AnimationStatusListener;
17+
export 'curves.dart' show Curve;
18+
1419
// Examples can assume:
1520
// late AnimationController controller;
1621

packages/flutter/lib/src/animation/curves.dart

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import 'dart:ui';
88

99
import 'package:flutter/foundation.dart';
1010

11+
export 'dart:ui' show Offset;
12+
1113
/// An abstract class providing an interface for evaluating a parametric curve.
1214
///
1315
/// A parametric curve transforms a parameter (hence the name) `t` along a curve

packages/flutter/lib/src/animation/listener_helpers.dart

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import 'package:flutter/foundation.dart';
77

88
import 'animation.dart';
99

10+
export 'dart:ui' show VoidCallback;
11+
12+
export 'animation.dart' show AnimationStatus, AnimationStatusListener;
13+
1014
/// A mixin that helps listen to another object only when this object has registered listeners.
1115
///
1216
/// This mixin provides implementations of [didRegisterListener] and [didUnregisterListener],

packages/flutter/lib/src/animation/tween.dart

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:ui' show Color, Size, Rect;
5+
import 'dart:ui' show Color, Rect, Size;
66

77
import 'package:flutter/foundation.dart';
88

9-
import 'animation.dart';
109
import 'animations.dart';
11-
import 'curves.dart';
10+
11+
export 'dart:ui' show Color, Rect, Size;
12+
13+
export 'animation.dart' show Animation;
14+
export 'curves.dart' show Curve;
1215

1316
// Examples can assume:
1417
// late Animation<Offset> _animation;

packages/flutter/lib/src/animation/tween_sequence.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
6-
import 'animation.dart';
75
import 'tween.dart';
86

7+
export 'tween.dart' show Animatable;
8+
99
// Examples can assume:
1010
// late AnimationController myAnimationController;
1111

packages/flutter/lib/src/material/arc.dart

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'dart:ui' show lerpDouble;
77

88
import 'package:flutter/animation.dart';
99
import 'package:flutter/foundation.dart';
10-
import 'package:flutter/painting.dart';
1110

1211
// How close the begin and end points must be to an axis to be considered
1312
// vertical or horizontal.

packages/flutter/lib/src/physics/clamped_simulation.dart

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart';
66

77
import 'simulation.dart';
88

9+
export 'simulation.dart' show Simulation;
10+
911
/// A simulation that applies limits to another simulation.
1012
///
1113
/// The limits are only applied to the other simulation's outputs. For example,

packages/flutter/lib/src/physics/friction_simulation.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import 'dart:math' as math;
77
import 'package:flutter/foundation.dart';
88

99
import 'simulation.dart';
10-
import 'tolerance.dart';
10+
11+
export 'tolerance.dart' show Tolerance;
1112

1213
/// A simulation that applies a drag to slow a particle down.
1314
///

packages/flutter/lib/src/physics/simulation.dart

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart';
66

77
import 'tolerance.dart';
88

9+
export 'tolerance.dart' show Tolerance;
10+
911
/// The base class for all simulations.
1012
///
1113
/// A simulation models an object, in a one-dimensional space, on which particular

packages/flutter/lib/src/physics/spring_simulation.dart

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import 'package:flutter/foundation.dart';
99
import 'simulation.dart';
1010
import 'utils.dart';
1111

12+
export 'tolerance.dart' show Tolerance;
13+
1214
/// Structure that describes a spring's constants.
1315
///
1416
/// Used to configure a [SpringSimulation].

packages/flutter/lib/src/rendering/animated_size.dart

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'package:flutter/animation.dart';
66
import 'package:flutter/foundation.dart';
7-
import 'package:flutter/scheduler.dart';
87

98
import 'box.dart';
109
import 'layer.dart';

packages/flutter/lib/src/widgets/scroll_activity.dart

-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import 'dart:math' as math;
77

88
import 'package:flutter/foundation.dart';
99
import 'package:flutter/gestures.dart';
10-
import 'package:flutter/physics.dart';
1110
import 'package:flutter/rendering.dart';
12-
import 'package:flutter/scheduler.dart';
1311

1412
import 'basic.dart';
1513
import 'framework.dart';

packages/flutter/test/material/tabs_test.dart

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'package:flutter/gestures.dart';
66
import 'package:flutter/material.dart';
7-
import 'package:flutter/physics.dart';
87
import 'package:flutter/rendering.dart';
98
import 'package:flutter_test/flutter_test.dart';
109

0 commit comments

Comments
 (0)