In some situations where you don't know whether you need to use children.query or not it will be a performance hit to be forced to register the query, since when children.register is called the set is initialized, even though the children set might never be used.
Adds a new sample in flame_forge2d for Raycast. It contains a sample implementation for finding nearest and farthest fixtures along the casted ray. Here is how it works, two rays (red and blue) are fired from same starting point with mouse position as the target. Red ray always stops at the nearest fixture and blue ray always stop at the farthest fixture. Paint of fixtures are changed depending on which ray hits it. If both rays hit the same fixture, it turns yellow.
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.
- Removed property Component._ancestors, which was a list stored with every Component object, but barely ever used. Removing this property reduces the overall memory footprint of the Component class;
- Method ancestors() now returns an Iterable instead of a List. Generally this should improve performance, since the most likely use of this method is to iterate over the chain of ancestors.
Added matcher closeToVector to help test equality of vectors. This matcher
follows standard Flutter convention for writing tests as expect(value, matcher);
provides meaningful description of the mismatch in case the test fails.
Also: fixed the name of the fails_assert_test, which wasn't running automatically because the file name did not end with _test.
Most gesture detectors work together now, except for the PanDetector or ScaleDetector together with the MultiTouchDragDetector. Maybe even the ScaleDetector will work with the MultiTouchDragDetector, will have to try.
* Effect.onFinish is now a user-defined function
* review suggestion
* Restore onFinish method
* docs
* move method to its old place
* Rename onFinish -> onFinishCallback
* Update docs
* Added Component.childrenFactory
* fix some of the lint warnings
* more lint warnings
* remove changelog entry
* more analyzer warnings
* one more warning
* one more warning
* remove more unused imports
* fix more warnings
* another warning
* one more warning
* a lot more warnings
* some more warnings
* fix warnings in flame_svg
* fix warnings in flame_bloc
* chore: Max line length of 80 (#1199)
* docs: Max line length of 80
* Fix missing >80 character lines
* Ugly, but that's how the formatter wants it
* added a test
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
* Added Component.childrenFactory
* fix some of the lint warnings
* more lint warnings
* remove changelog entry
* more analyzer warnings
* one more warning
* one more warning
* remove more unused imports
* fix more warnings
* another warning
* one more warning
* a lot more warnings
* some more warnings
* fix warnings in flame_svg
* fix warnings in flame_bloc
* Remove OrderedSet override feature
* Remove testRandom change
* Remove unnecessary type checks
* Re-remove deprecated argument in random_test
Co-authored-by: Pasha Stetsenko <stpasha@google.com>