8 Commits

Author SHA1 Message Date
b79fee0ae2 chore: Update min Dart constraint to 3.8 (#3676)
Update min Dart constraint to 3.8, which will enable us to use the
fancier collection literals.

This requires bumping the min Flutter version as well:

<img width="1892" height="1122" alt="image"
src="https://github.com/user-attachments/assets/7c7b07fc-4d96-4987-824d-9a7133ecfb85"
/>
2025-08-10 12:42:31 -04:00
83352acb2e docs: Fix exception thrown in ember quest tutorial (#3228)
Ember quest's run button was throwing an `unimplemented error`. This was
happening was `EmberQuestGame.loadGameSegments`'s pattern matching was
failing to match the block types. It seems for patterns involving
`Type`, the correct way is to use `const (Foo)`. See second example
[here](https://dart.dev/tools/linter-rules/type_literal_in_constant_pattern#details).
2024-07-21 12:49:30 +02:00
6e80bf5e67 feat: Expand flame_lint to respect required pub.dev checks (#3139)
Expand flame_lint to respect required pub.dev checks.

We are currently losing pub points due to lint violations:


![image](https://github.com/flame-engine/flame/assets/882703/b6a6cf0a-aea1-4e75-b1cb-611d5f8a154c)

Turns out `flame_lint` does not respect lints/core which is being
enforced now by pub.

This adds that as a dependency on `flame_lint`, updates `flutter_lint`
for the packages that use that, and fix all existing violations (luckily
very few).

This change will ensure that us and everyone else who uses `flame_lint`
get all the points they deserve on pub. We can consider expanding to
`lints/recommended` in the future, but that is definitely not a
requirement at this stage (and a much bigger change).
2024-04-28 10:23:08 -04:00
b283b82f6c refactor: Modernize switch; use switch-expressions and no break; (#3133)
Replaces the switch cases that can be replaces with switch expressions
and removes `break;` where it isn't needed.

https://dart.dev/language/branches#switch-statements
2024-04-18 23:41:08 +02:00
7c2f400076 feat!: Add CameraComponent to FlameGame (#2740)
This PR adds the `CameraComponent` and a `World` by default to the
FlameGame.
2023-09-18 21:06:37 +02:00
2d45d2be39 chore: Remove 1.8.0 deprecations (#2538)
Removes all the deprecated methods before 1.8.0 release.
2023-05-22 19:01:55 +02:00
dbda37b81a refactor: Add new lint rules (#2477)
This PR adds the following lint rules to our list:

```
always_put_required_named_parameters_first
avoid_multiple_declarations_per_line
avoid_positional_boolean_parameters
avoid_returning_null_for_void
avoid_returning_this
avoid_unnecessary_containers
enable_null_safety
library_private_types_in_public_api
no_leading_underscores_for_library_prefixes
no_leading_underscores_for_local_identifiers
prefer_null_aware_method_calls
tighten_type_of_initializing_formals
unnecessary_late
use_setters_to_change_properties
```

And these rules were considered, and some changes were made according to
them as a clean-up, but in many places they didn't make sense
(`prefer_asserts_with_message` I would have included, but there were too
many places that needed to be changes):

```
collection_methods_unrelated_type
prefer_asserts_with_message
avoid_renaming_method_parameters
```
2023-04-13 19:42:00 +00:00
6938c860a0 docs: Platform tutorial (#2105)
This adds a platformer tutorial called Ember Quest. I hope I have done a service, because I am tired, lol. I am sure there will be comments. I just want to say, I did my best. I approached this as someone new to Flame, just like I was about 10 months ago. Are there concepts that can be improved, sure. We can always optimize code, but I didn't want any concepts to be super abstract. I had never coded a game before when I began my journey with Flame this year, so things might be a bit simple for experienced game developers, but for myself, I had never even thought about a game loop or animations, etc.
2022-10-29 19:59:51 +01:00