Skip to content

Commit de55eec

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

File tree

17 files changed

+39
-13
lines changed

17 files changed

+39
-13
lines changed

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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 5 additions & 1 deletion
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

Lines changed: 5 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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.

0 commit comments

Comments
 (0)