13 Commits

Author SHA1 Message Date
aedb30be8e chore(release): publish packages (#1407)
- flame@1.1.0-releasecandidate.1
 - flame_bloc@1.2.0-releasecandidate.1
 - flame_rive@1.1.0-releasecandidate.1
 - flame_test@1.2.0-releasecandidate.1
 - flame_tiled@1.3.0-releasecandidate.1
2022-02-28 15:09:17 -03:00
c753fc4636 feat: Components are now always added in the correct order (#1337)
* wip o lifecycle

* Component.add() is no longer async

* fix a test

* game.ready

* fix analyze issues

* FcsRoot

* fix tests

* fix game-in-game example

* Merge _addImpl with add()

* Move some of the functionality from prepare() into add()

* Moved FcsRoot into component.dart and renamed

* more doc-comments

* dartdocs

* Remove addLater in ComponentSet

* format

* temporarily switch to path dependency in flame_test

* restore a test

* format

* get rid of prepare() in Collidable

* eliminate prepare() in Draggable

* eradicate prepare() in Hoverable

* remove prepare() from Tappable

* remove prepare() method and isPrepared flag

* remove prepareComponent() from HasCollidables

* remove prepareComponent

* make flame_bloc depend on latest flame

* try to solve flame_bloc dependency graph

* fix game resize issue

* fix gameresize for zoomed game

* do not allow zero size in onGameResize

* move onMount() call into add()

* use loadingBuilder when size is 0

* ComponentTreeRoot is now in its own file

* addToParent()

* switch to mount queue

* rename isReadyToMount -> isPrepared

* make isMounted and isPrepared readonly

* minor

* print error stacktrace

* Component.add() is now async

* fix tests

* unused import
;

* undo irrelevant changes in Component

* update tests

* tests cleanup

* format

* expand doc for ComponentTreeRoot

* fix analysis error

* added tests

* update docs

* resolve version conflict in pubspec

* Apply suggestions from code review

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* late final

* remount() function

* remove mountQueue

* simplify ready()

* run mount during children queue processing

* simplify mounting

* rename childrenQueue->childreQueues

* merge tryMounting() with remount()

* avoid statics in components lifecycle

* remove ComponentTreeRoot

* remove dead code

* added a todo

* added docs for SingleGameInstance

* Added tests for SingleGameInstance

* added SingleGameInstance to the main doc site

* Added test for multi-widget games

* cleanup

* use state variable in Component

* remove test as dependency

* upgrade mocktail version

* upgrade dartdoc version

* fix analyzer warnings

* mark staticgameinstance as internal

* remove ComponentSet.addChild

* use log() from dart:developer

* undo changes in flame_bloc/pubspec.yaml

* redo changes in flame_bloc/pubspec.yaml

* fix dependency in flame_test

* remove test dependencies

* update pubspec files

* remove dart_code_metrics from pubspec

* fix a test

* Added GameTester.makeReady

* omit type on class variable when it can be inferred

Co-authored-by: Erick <erickzanardoo@gmail.com>

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
Co-authored-by: Erick <erickzanardoo@gmail.com>
2022-02-14 23:22:44 +01:00
0ddf6d094a remove "test" dependency (#1367) 2022-02-12 08:05:51 -03:00
9935a5024c chore: Add melos-action to cicd (#1354) 2022-02-10 22:49:40 +01:00
db7842df93 chore(publish): Publish flame_test 1.1.0 (#1299)
Publish new version of flame_test (1.1.0)
2022-01-07 11:09:08 +00:00
bac6c8a446 refactor: Add a few more rules to flame_lint, including use_key_in_widget_constructors (#1248)
This:

    Add new rule use_if_null_to_convert_nulls_to_bools to flame_lint (no violations)
    Add new rule use_key_in_widget_constructors (several violations)
    Fix violations
    Exclude generated files from flame_lint (we don't have any on this repo but when using on games often there are)

I believe this is not a breaking change because it just adds optional arguments to constructors, but if it is, we can reconsider this PR.
2021-12-19 11:07:42 +01:00
a0cf56ee0c chore: Ensure unique names for all flame sub-packages (#1214)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-12-14 13:22:12 -03:00
cca79f8dd8 Publish flame test 1.0.1 (#1184)
* flame_test 1.0.1

* Updated changelog

* Revert to path again
2021-12-08 18:44:12 +00:00
1b81e056e6 Improved testing API (#1001) 2021-11-08 03:15:09 +00:00
3bdb90fb5c Adding flame_lint and removing dart code metrics (#1049)
* Adding flame_lint and removing dart code metrics

* Update packages/flame_flare/example/pubspec.yaml

* updating analyze action

* adding missing dardoc dep on flame_lint

* removing test folder from the lint package

* fixing sdk versions

* license and changeog fix

* Update packages/flame_lint/README.md

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* additional readme fix

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-10-26 23:50:30 +00:00
8e72998b52 Make onLoad mandatory (#974)
* Fix performance issues with RC14

* Changelog

* Fix analysis

* Bring back the collidables list

* .

* .
2021-09-28 19:43:43 -03: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
7b51539bae Add example for flame_test (#958)
* Add example for flame_test

* Fix analyze warnings

* Fix tests
2021-09-16 20:57:04 +02:00