12 Commits

Author SHA1 Message Date
d460b846c2 feat: Add HoverCallbacks (#2706)
This creates HoverCallbacks (and PointerMoveCallbacks) to replicate the Hoverables behaviour in the new camera and event system.
2023-09-10 14:49:52 -04:00
a1cb9a06ad refactor!: Kill TextRenderer, Long Live TextRenderer (#2683)
This will:

    kill the TextRenderer inheritance chain
    incorporate the functionality of the base TextRenderer in the base TextFormatter
    rename TextFormatter to TextRenderer and appropriate references

That is because both essentially do the same job; encompass the style (or "how") information about how to render text, but using two slightly different interfaces. While that could allow for more flexibility, it is a faux choice that needlessly complicates the pipeline. By having a single interface to comply with, we still allow for custom renders while at the same time making all the code downstream simpler to use and understand.
2023-08-27 21:47:01 +02:00
25f3f721e7 test: Widget tests for Event Mixin (#2048)
Widget test for DragCallbacks and TapCallbacks
    Added some common function in separate file for common use case
    Minor test case description changed for MultiTouchTapDetector
2022-10-08 17:53:08 +02:00
426827d19e feat: Added DebugTextFormatter (#1921)
DebugTextFormatter is a text formatter for use in tests, correspondingly, it is defined in flame_test.
    Compared to DebugTextPainterTextElement it has several advantages:
        Does not depend on a TextPainter, and thus it is truly platform-independent;
        Supports font-weight, font-style, and color.
    DebugTextPainterTextElement and the debugMode in TextPainterTextFormatter are deprecated.
2022-09-19 21:51:53 +02:00
80d9d2b354 chore: Remove deprecated methods (#1705)
Removes all methods and classes that were marked to be removed in v1.2.0 in their deprecation tags.
2022-06-06 19:59:31 +00:00
d0faaada2b feat: Add helper function for creating golden tests (#1623) 2022-05-15 20:50:27 +00:00
f7b6cc69ab feat: Added closeToAabb() (#1531) 2022-04-11 22:00:56 +02:00
491889cef9 test: Add testWithFlameGame and testWithGame helper functions (#1358)
* Added withFlameGame() and withUserGame()

* format

* added tests

* switch to flameGameTest()

* fix pubspec

* switch to testFlameGame

* rename file

* fix pubspec

* fix dependencies

* rename testFlameGame -> testWithFlameGame

* fix a test for testWithFlameGame
2022-02-18 14:29:28 -03:00
cf577bedaf chore(flame_test): Deprecate expectVector2 (#1275)
Function expectVector2 is deprecated in favor of closeToVector(). All uses of expectVector2 removed from our tests.
2021-12-27 19:17:32 +00:00
bfcda073bb Effect controllers restructuring (#1134)
* Update effectController

* move effect controllers into the controllers/ directory

* Add .forward property to EffectController

* SimpleEffectController supports reverse time

* Fixing some compile errors

* rename SimpleEffectController -> LinearEffectController

* minor cleanup

* DurationEffectController and PauseEffectController

* ReverseLinearEffectController

* CurvedEffectController and its reverse

* InfiniteEffectController

* Added EffectController.recede()

* Add EffectController.update()

* Add InfiniteEffectController'

* RepeatedEffectController

* SequenceEffectController

* DelayedEffectController

* Restore the [EffectController.started] property

* minor

* Rename reset() -> setToStart()

* time direction is now managed from the Effect class

* StandardEffectController replaced with function standardController()

* update some doc-comments

* flutter analyze

* flutter format

* fix some tests

* more test fixes

* fix remaining tests

* format

* rename local variable

* minor simplification

* Expand docs in PauseEffectController

* added tests

* Curved controller test

* fix errors

* formatting

* added more tests

* format

* fix RepeatedEffectController

* more tests

* format

* changelog

* increase tolerance

* Replaced standardController with factory EffectController constructor

* Added parameter EffectController({alternate=false})

* Added default for curve= parameter

* rename

* rename tests

* added more exports

* rename tests

* rename src/effects2

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-04 15:58:42 +00:00
02dadb2433 Adding Flame test use case methods (#963)
* Adding Flame test use case methods

* Update packages/flame_test/lib/src/flame_test.dart

* Update packages/flame_test/lib/src/flame_test.dart

* Update packages/flame_test/CHANGELOG.md

* Update packages/flame_test/example/lib/game.dart
2021-09-20 17:14:11 -03:00
2a7af3730b Independent test helpers (#957)
* Independent test helpers

* Relative test helper path

* Fix imports

* Fix pubspec description

* Less tested lines, since the moved lines were in tests

* Move to canvas_test
2021-09-16 13:24:45 +02:00