Skip to content

Commit

Permalink
refactor!: Un-export Timer (#90)
Browse files Browse the repository at this point in the history
This PR removes the internal `Timer` class from the exports. It is a
very simple wrapper over the `Stopwatch` API and does not provide any
additional functionality. But it does causes conflicts when try to use
Flame's `Timer` or dart:async's `Timer`. By not exporting it, we can
save the users from these conflicts.
  • Loading branch information
ufrshubham authored Mar 13, 2024
1 parent c950d1b commit abf2378
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/forge2d/example/web/demo.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:html' hide Body;

import 'package:forge2d/forge2d_browser.dart' hide Timer;
import 'package:forge2d/forge2d_browser.dart';

/// An abstract class for any Demo of the Forge2D library.
abstract class Demo {
Expand Down
1 change: 0 additions & 1 deletion packages/forge2d/lib/src/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ export 'common/color3i.dart';
export 'common/raycast_result.dart';
export 'common/rot.dart';
export 'common/sweep.dart';
export 'common/timer.dart';
export 'common/transform.dart';
export 'common/viewport_transform.dart';
1 change: 1 addition & 0 deletions packages/forge2d/lib/src/dynamics/world.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import 'dart:math';

import 'package:forge2d/forge2d.dart';
import 'package:forge2d/src/common/timer.dart';
import 'package:forge2d/src/settings.dart' as settings;

/// The world class manages all physics entities, dynamic simulation, and
Expand Down
4 changes: 2 additions & 2 deletions packages/forge2d/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
meta: ^1.9.1
meta: ^1.11.0
vector_math: ^2.1.4

dev_dependencies:
dartdoc: ^7.0.2
flame_lint: ^1.1.1
mocktail: ^1.0.1
test: any
test: ^1.24.9

0 comments on commit abf2378

Please sign in to comment.