diff --git a/examples/lib/stories/camera_and_viewport/camera_component_example.dart b/examples/lib/stories/camera_and_viewport/camera_component_example.dart index 4e4b045dc08..f3fd5ac8bc8 100644 --- a/examples/lib/stories/camera_and_viewport/camera_component_example.dart +++ b/examples/lib/stories/camera_and_viewport/camera_component_example.dart @@ -5,6 +5,7 @@ import 'package:flame/camera.dart'; import 'package:flame/components.dart'; import 'package:flame/events.dart'; import 'package:flame/extensions.dart' show OffsetExtension; +import 'package:flame/extensions_matrix4.dart'; import 'package:flame/game.dart'; import 'package:flame/geometry.dart'; import 'package:flame/input.dart'; diff --git a/packages/flame/lib/src/components/mixins/snapshot.dart b/packages/flame/lib/src/components/mixins/snapshot.dart index 3580467438b..d585685d192 100644 --- a/packages/flame/lib/src/components/mixins/snapshot.dart +++ b/packages/flame/lib/src/components/mixins/snapshot.dart @@ -2,6 +2,7 @@ import 'dart:typed_data'; import 'dart:ui'; import 'package:flame/components.dart'; +import 'package:vector_math/vector_math.dart'; /// A mixin that enables caching a component and all its children. If /// [renderSnapshot] is set to `true`, the component and its children will be diff --git a/packages/flame/lib/src/components/position_component.dart b/packages/flame/lib/src/components/position_component.dart index 39d49e97cde..c64e3b9be1e 100644 --- a/packages/flame/lib/src/components/position_component.dart +++ b/packages/flame/lib/src/components/position_component.dart @@ -14,6 +14,7 @@ import 'package:flame/src/game/notifying_vector2.dart'; import 'package:flame/src/game/transform2d.dart'; import 'package:flame/src/rendering/decorator.dart'; import 'package:flame/src/rendering/transform2d_decorator.dart'; +import 'package:vector_math/vector_math.dart'; /// A [Component] implementation that represents an object that can be /// freely moved around the screen, rotated, and scaled. diff --git a/packages/flame/lib/src/extensions/vector2.dart b/packages/flame/lib/src/extensions/vector2.dart index aceae4b7925..3a680f6ad01 100644 --- a/packages/flame/lib/src/extensions/vector2.dart +++ b/packages/flame/lib/src/extensions/vector2.dart @@ -1,9 +1,8 @@ import 'dart:math'; import 'dart:ui'; -import 'package:vector_math/vector_math.dart'; - -export 'package:vector_math/vector_math.dart' hide Colors; +import 'package:vector_math/vector_math.dart' hide Colors, Matrix4; +export 'package:vector_math/vector_math.dart' hide Colors, Matrix4; extension Vector2Extension on Vector2 { /// This is a reusable vector that can be used within the [Vector2Extension] diff --git a/packages/flame/lib/src/sprite_batch.dart b/packages/flame/lib/src/sprite_batch.dart index b74477ef06b..f47df475f84 100644 --- a/packages/flame/lib/src/sprite_batch.dart +++ b/packages/flame/lib/src/sprite_batch.dart @@ -8,6 +8,7 @@ import 'package:flame/extensions.dart'; import 'package:flame/flame.dart'; import 'package:flame/game.dart'; import 'package:meta/meta.dart'; +import 'package:vector_math/vector_math.dart'; extension SpriteBatchExtension on Game { /// Utility method to load and cache the image for a [SpriteBatch] based on diff --git a/packages/flame/test/components/mixins/snapshot_test.dart b/packages/flame/test/components/mixins/snapshot_test.dart index 2d86e6d3e49..6bfe249f20d 100644 --- a/packages/flame/test/components/mixins/snapshot_test.dart +++ b/packages/flame/test/components/mixins/snapshot_test.dart @@ -6,6 +6,7 @@ import 'package:flame/extensions.dart'; import 'package:flame/game.dart'; import 'package:flame_test/flame_test.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:vector_math/vector_math.dart'; void main() { group( diff --git a/packages/flame/test/components/position_component_test.dart b/packages/flame/test/components/position_component_test.dart index c63b2995136..6c6ff17ee78 100644 --- a/packages/flame/test/components/position_component_test.dart +++ b/packages/flame/test/components/position_component_test.dart @@ -8,6 +8,7 @@ import 'package:flame/game.dart'; import 'package:flame/geometry.dart'; import 'package:flame_test/flame_test.dart'; import 'package:test/test.dart'; +import 'package:vector_math/vector_math.dart'; void main() { group('PositionComponent', () { diff --git a/packages/flame/test/extensions/rect_test.dart b/packages/flame/test/extensions/rect_test.dart index 387e07bbe8a..67bd3304c4a 100644 --- a/packages/flame/test/extensions/rect_test.dart +++ b/packages/flame/test/extensions/rect_test.dart @@ -6,6 +6,7 @@ import 'package:flame/geometry.dart'; import 'package:flame_test/flame_test.dart'; import 'package:mocktail/mocktail.dart'; import 'package:test/test.dart'; +import 'package:vector_math/vector_math.dart'; void main() { group('RectExtension', () { diff --git a/packages/flame_studio/lib/src/widgets/panels/hierarchy_view.dart b/packages/flame_studio/lib/src/widgets/panels/hierarchy_view.dart index 0226116996a..65e72a6c57b 100644 --- a/packages/flame_studio/lib/src/widgets/panels/hierarchy_view.dart +++ b/packages/flame_studio/lib/src/widgets/panels/hierarchy_view.dart @@ -1,4 +1,4 @@ -import 'package:flame/components.dart' show Component; +import 'package:flame/components.dart'; import 'package:flame_studio/src/core/component_tree.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';