62 Commits

Author SHA1 Message Date
a2cc332161 chore: Bump min supported Flutter version to match stable (#3368)
Bumps min flutter version to 3.24 (stable is at 3.24.5 already).
This allows us to finally merge flame_3d in.
2024-12-10 15:59:23 +00:00
b2e63d8931 chore(release): Publish packages (#3373)
- flame@1.22.0
 - flame_console@0.1.1
 - flame_fire_atlas@1.7.0
 - flame_behavior_tree@0.1.3+3
 - flame_test@1.17.3
 - flame_tiled@1.21.1
 - flame_oxygen@0.2.3+3
 - flame_isolate@0.6.2+3
 - flame_texturepacker@4.1.3
 - flame_sprite_fusion@0.1.3+3
 - flame_audio@2.10.6
 - flame_spine@0.2.2+3
 - flame_bloc@1.12.4
 - flame_kenney_xml@0.1.1+3
 - flame_lottie@0.4.2+3
 - flame_rive@1.10.6
 - flame_markdown@0.2.2+3
 - flame_svg@1.11.3
 - flame_forge2d@0.18.2+3
 - flame_noise@0.3.2+3
 - flame_riverpod@5.4.6
 - flame_network_assets@0.3.3+3
2024-11-25 11:38:23 +01:00
b233cdb794 chore(release): Publish packages (#3346)
Prepared all packages to be released to pub.dev

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-16 17:38:53 +00:00
a916314388 chore(release): Publish all packages (#3312)
Prepared all packages to be released to pub.dev

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-20 23:11:09 +02:00
981bb343c3 chore(release): Publish Flame v1.19.0 (#3287)
![image](https://github.com/user-attachments/assets/9df7ec4e-efe4-4211-9ce2-69db7c63f35e)
2024-08-27 20:33:35 +00:00
fabbf928d0 chore: Enable DCM rule double-literal-format (#3248)
Enable DCM rule double-literal-format.

More details
[here](https://dcm.dev/docs/rules/common/double-literal-format/). This
both forbids trailing zeroes and mandates leading zeroes.

If we would prefer a different style (e.g. prefer no leading zero
instead), just lmk :)
2024-07-30 11:17:27 -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
a1f9633cbc chore(release): Publish Flame v1.18.0 et. al (#3178)
```
Package Name           Current Version   Updated Version   Update Reason
behavior_tree          0.1.1             0.1.2             manual versioning
flame                  1.17.0            1.18.0            manual versioning
flame_behavior_tree    0.1.1             0.1.2             manual versioning
flame_forge2d          0.18.0            0.18.1            manual versioning
flame_isolate          0.6.0+1           0.6.1             manual versioning
flame_markdown         0.2.0+1           0.2.1             manual versioning
flame_oxygen           0.2.1             0.2.2             manual versioning
flame_sprite_fusion    0.1.1             0.1.2             manual versioning
flame_lottie           0.4.0+1           0.4.1             manual versioning
flame_noise            0.3.0+1           0.3.1             manual versioning
flame_network_assets   0.3.1             0.3.2             manual versioning
flame_spine            0.2.0+1           0.2.1             manual versioning
flame_audio            2.10.1            2.10.2            updated with patch changes
flame_bloc             1.11.1            1.12.0            updated with minor changes
flame_lint             1.1.2             1.2.0             updated with minor changes
flame_rive             1.10.1            1.10.2            updated with patch changes
flame_texturepacker    4.0.0             4.0.1             updated with patch changes
flame_tiled            1.20.1            1.20.2            updated with patch changes
jenny                  1.3.0             1.3.1             updated with patch changes
flame_test             1.16.1            1.16.2            dependency was updated
flame_fire_atlas       1.5.1             1.5.2             dependency was updated
flame_riverpod         5.4.1             5.4.2             dependency was updated
flame_svg              1.10.1            1.10.2            dependency was updated
```
2024-05-27 21:20:57 +00:00
7f1ba0d68d chore: Bump dependencies (#3176)
Bumps outdated dependencies.
2024-05-28 02:23:45 +05:30
458d53b63c chore(deps): Bump to Flutter 3.22.0 (#3174)
Bumps Flutter to 3.22.0, needed for #3173
2024-05-27 19:32:12 +02:00
6d7eeee398 chore: Update dart sdk constraint to >=3.3.0 (#3160)
This PR bumps the min sdk constraint to 3.3.0. It also updates one of
the golden tests for flame_svg which was failing with a slight
difference in the svg output around the edges. The difference was very
minor an barely noticeable visually.
2024-05-16 10:56:51 +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
e1abefdd23 docs: Larger menu overlay and better error text for platform+space shooter tutorials (#3135)
- doc/tutorials/ platformer/app/lib/overlays/main_menu.dart: adjust
container height to avoid overflow
- doc/tutorials/space_shooter/app/lib/main.dart: more descriptive error
message when GET param (step) is missing
2024-04-25 21:34:27 +02: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
8332a68d8c chore: Make the pngs smaller (#3125)
`find . -iname '*.png' | xargs oxipng -o max --trip safe`
2024-04-17 23:50:30 +02:00
639dac0732 chore(release): Publish Flame v1.17.0 (#3108)
```
Package Name           Current Version   Updated Version   Update Reason
flame                  1.16.0            1.17.0            manual versioning
flame_forge2d          0.17.0            0.17.1            manual versioning
flame_oxygen           0.2.0             0.2.1             manual versioning
behavior_tree          0.1.0             0.1.1             updated with minor changes
flame_behavior_tree    0.1.0             0.1.1             updated with minor changes
flame_network_assets   0.3.0             0.3.1             updated with minor changes
flame_sprite_fusion    0.1.0             0.1.1             updated with minor changes
flame_texturepacker    3.1.0             3.2.0             updated with minor changes
flame_tiled            1.19.0            1.20.0            updated with minor changes
flame_test             1.16.0            1.16.1            dependency was updated
flame_isolate          0.6.0             0.6.0+1           dependency was updated
flame_fire_atlas       1.5.0             1.5.1             dependency was updated
flame_audio            2.10.0            2.10.1            dependency was updated
flame_spine            0.2.0             0.2.0+1           dependency was updated
flame_bloc             1.11.0            1.11.1            dependency was updated
flame_lottie           0.4.0             0.4.0+1           dependency was updated
flame_markdown         0.2.0             0.2.0+1           dependency was updated
flame_rive             1.10.0            1.10.1            dependency was updated
flame_noise            0.3.0             0.3.0+1           dependency was updated
flame_riverpod         5.4.0             5.4.1             dependency was updated
flame_svg              1.10.0            1.10.1            dependency was updated
```
2024-03-29 16:26:20 +01:00
12841d6471 docs: Update RawKeyEvent references to KeyEvent (#3052) (#3053)
This PR fixes #3052 and updates deprecated type references in docs from
`RawKeyEvent` to `KeyEvent`.

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2024-03-06 14:40:54 +01:00
d409193300 chore(release): Publish Flame v1.16.0 et. al (#3044)
```
Package Name           Current Version   Updated Version   Update Reason
flame                  1.15.0            1.16.0            manual versioning
flame_audio            2.1.8             2.10.0            manual versioning
flame_bloc             1.10.10           1.11.0            manual versioning
flame_fire_atlas       1.4.8             1.5.0             manual versioning
flame_rive             1.9.11            1.10.0            manual versioning
flame_riverpod         5.2.0             5.3.0             manual versioning
flame_svg              1.9.0             1.10.0            manual versioning
flame_test             1.15.4            1.16.0            manual versioning
flame_texturepacker    3.0.0             3.1.0             manual versioning
flame_tiled            1.18.4            1.19.0            manual versioning
flame_forge2d          0.16.0+5          0.17.0            updated with major changes
flame_isolate          0.5.1             0.6.0             updated with major changes
flame_lottie           0.3.0+8           0.4.0             updated with major changes
flame_markdown         0.1.1+8           0.2.0             updated with major changes
flame_network_assets   0.2.0+13          0.3.0             updated with major changes
flame_noise            0.2.0             0.3.0             updated with major changes
flame_oxygen           0.1.9+8           0.2.0             updated with major changes
flame_spine            0.1.1+10          0.2.0             updated with major changes
flame_splash_screen    0.2.0             0.3.0             updated with major changes
jenny                  1.2.1             1.3.0             updated with minor changes
```
2024-02-17 11:23:14 +01:00
330862c98e fix!: Migrate from RawKeyEvent to KeyEvent (#3002)
First pass at migrating from `RawKeyEvent` and `RawKeyboard`
to `KeyEvent` and `HardwareKeyboard`.

Context:
https://docs.flutter.dev/release/breaking-changes/key-event-migration
2024-02-15 23:10:51 +01:00
abca337734 chore(release): Publish Flame v1.15.0 (#3022)
```
The following 18 packages will be updated:

Package Name           Current Version   Updated Version   Update Reason
flame                  1.14.0            1.15.0            updated with minor changes
flame_isolate          0.5.0+7           0.5.1             updated with minor changes
flame_noise            0.1.1+12          0.2.0             updated with major changes
flame_riverpod         5.1.5             5.2.0             updated with minor changes
flame_test             1.15.3            1.15.4            updated with patch changes
flame_texturepacker    2.1.0             3.0.0             updated with major changes
flame_oxygen           0.1.9+7           0.1.9+8           dependency was updated
flame_tiled            1.18.3            1.18.4            dependency was updated
flame_fire_atlas       1.4.7             1.4.8             dependency was updated
flame_audio            2.1.7             2.1.8             dependency was updated
flame_spine            0.1.1+9           0.1.1+10          dependency was updated
flame_bloc             1.10.9            1.10.10           dependency was updated
flame_rive             1.9.10            1.9.11            dependency was updated
flame_lottie           0.3.0+7           0.3.0+8           dependency was updated
flame_markdown         0.1.1+7           0.1.1+8           dependency was updated
flame_forge2d          0.16.0+4          0.16.0+5          dependency was updated
flame_svg              1.8.9             1.8.10            dependency was updated
flame_network_assets   0.2.0+12          0.2.0+13          dependency was updated
```
2024-02-07 21:23:29 +01:00
f96a2c5216 chore(release): Publish Flame v1.14.0 (#2960)
```
Package Name           Current Version   Updated Version   Update Reason
flame                  1.13.1            1.14.0            manual versioning
flame_forge2d          0.16.0+3          0.16.0+4          updated with patch changes
flame_test             1.15.2            1.15.3            dependency was updated
flame_tiled            1.18.2            1.18.3            dependency was updated
flame_oxygen           0.1.9+6           0.1.9+7           dependency was updated
flame_isolate          0.5.0+6           0.5.0+7           dependency was updated
flame_fire_atlas       1.4.6             1.4.7             dependency was updated
flame_audio            2.1.6             2.1.7             dependency was updated
flame_spine            0.1.1+8           0.1.1+9           dependency was updated
flame_bloc             1.10.8            1.10.9            dependency was updated
flame_lottie           0.3.0+6           0.3.0+7           dependency was updated
flame_markdown         0.1.1+6           0.1.1+7           dependency was updated
flame_rive             1.9.9             1.9.10            dependency was updated
flame_noise            0.1.1+11          0.1.1+12          dependency was updated
flame_riverpod         5.1.3             5.1.4             dependency was updated
flame_svg              1.8.8             1.8.9             dependency was updated
flame_network_assets   0.2.0+11          0.2.0+12          dependency was updated
```
2024-01-04 23:34:46 +01:00
f1d94ca376 chore(release): Flame v1.13.0 (#2934)
```
Package Name           Current Version   Updated Version   Update Reason
flame                  1.12.0            1.13.0            updated with minor changes
flame_rive             1.9.8             1.9.9             updated with patch changes
flame_riverpod         5.1.0             5.1.1             updated with patch changes
flame_tiled            1.18.1            1.18.2            updated with patch changes
flame_test             1.15.1            1.15.2            dependency was updated
flame_oxygen           0.1.9+5           0.1.9+6           dependency was updated
flame_isolate          0.5.0+5           0.5.0+6           dependency was updated
flame_fire_atlas       1.4.5             1.4.6             dependency was updated
flame_audio            2.1.5             2.1.6             dependency was updated
flame_spine            0.1.1+7           0.1.1+8           dependency was updated
flame_bloc             1.10.7            1.10.8            dependency was updated
flame_lottie           0.3.0+5           0.3.0+6           dependency was updated
flame_markdown         0.1.1+5           0.1.1+6           dependency was updated
flame_svg              1.8.7             1.8.8             dependency was updated
flame_forge2d          0.16.0+2          0.16.0+3          dependency was updated
flame_noise            0.1.1+10          0.1.1+11          dependency was updated
flame_network_assets   0.2.0+10          0.2.0+11          dependency was updated
```
2023-12-19 16:40:51 +01:00
47643f05fb chore(release): Flame v1.12.0 (#2911)
```
The following 17 packages will be updated:

Package Name           Current Version   Updated Version   Update Reason
flame                  1.11.0            1.12.0            updated with minor changes
flame_riverpod         5.0.0             5.1.0             updated with minor changes
flame_test             1.15.0            1.15.1            dependency was updated
flame_tiled            1.18.0            1.18.1            dependency was updated
flame_oxygen           0.1.9+4           0.1.9+5           dependency was updated
flame_isolate          0.5.0+4           0.5.0+5           dependency was updated
flame_fire_atlas       1.4.4             1.4.5             dependency was updated
flame_audio            2.1.4             2.1.5             dependency was updated
flame_spine            0.1.1+6           0.1.1+7           dependency was updated
flame_bloc             1.10.6            1.10.7            dependency was updated
flame_lottie           0.3.0+4           0.3.0+5           dependency was updated
flame_markdown         0.1.1+4           0.1.1+5           dependency was updated
flame_rive             1.9.7             1.9.8             dependency was updated
flame_forge2d          0.16.0+1          0.16.0+2          dependency was updated
flame_noise            0.1.1+9           0.1.1+10          dependency was updated
flame_svg              1.8.6             1.8.7             dependency was updated
flame_network_assets   0.2.0+9           0.2.0+10          dependency was updated
```
2023-12-08 21:09:01 +00:00
eef51968e7 docs: Update platformer tutorial to latest Flame (#2904)
Updates the  platformer tutorial to Flame v1.11.0
2023-12-08 16:19:09 -03:00
2722b00c75 chore(release): Flame v1.11.0 (#2885)
Release of Flame v1.11.0 and all packages.
2023-11-30 22:32:11 +01:00
501506810b docs: Fix EmberQuest tutorial typos (#2870)
Fix EmberQuest tutorial typos described in issue #2869 


Closes #2869
2023-11-26 12:05:15 +01:00
10df590cc9 fix: Adjust platformer tutorial steps (#2845)
This small PR adjusts:
1. some `backticks` (`) in the platformer tutorial in order to have a
proper highlight of the file names.
2. replaces backslash (`\`) with slash (`/`) in order to be consistent
with the other file paths used in the tutorial.
3. renames the variable `_xOffset` to `xOffset` in order to be
consistent with the rest of the code.

Co-authored-by: Rodrigo Castro <rodrigo.desouzacastro@bahag.com>
2023-11-07 21:06:06 +01:00
2cc60c8fee chore(release): Flame v1.10.1 (#2837)
This releases Flame v1.10.1 et. al.
`flame_test` and `flame_forge2d` has some important changes here too.
2023-11-03 19:49:37 -03:00
6626989bdb chore(release): Publish Flame v1.10.0 (#2816)
- flame@1.10.0
 - flame_audio@2.1.2
 - flame_bloc@1.10.4
 - flame_fire_atlas@1.4.2
 - flame_forge2d@0.15.1
 - flame_isolate@0.5.0+2
 - flame_lottie@0.3.0+2
 - flame_network_assets@0.2.0+7
 - flame_rive@1.9.4
 - flame_svg@1.8.4
 - flame_test@1.13.2
 - flame_tiled@1.15.0
 - jenny@1.1.1
 - flame_spine@0.1.1+4
 - flame_markdown@0.1.1+2
 - flame_oxygen@0.1.9+2
 - flame_noise@0.1.1+7
2023-10-12 10:09:24 +00:00
ebfa3c5682 chore(release): publish packages
- flame@1.9.1
 - flame_isolate@0.5.0+1
 - flame_tiled@1.14.1
 - flame_audio@2.1.1
 - flame_spine@0.1.1+3
 - flame_svg@1.8.3
 - flame_test@1.13.1
 - flame_oxygen@0.1.9+1
 - flame_bloc@1.10.3
 - flame_fire_atlas@1.4.1
 - flame_markdown@0.1.1+1
 - flame_forge2d@0.15.0+1
 - flame_rive@1.9.3
 - flame_noise@0.1.1+6
 - flame_network_assets@0.2.0+6
 - flame_lottie@0.3.0+1
2023-09-22 16:28:53 +02:00
8b50341613 chore(release): Publish v1.9.0 (#2759)
- flame@1.9.0
 - flame_oxygen@0.1.9
 - flame_test@1.13.0
 - flame_tiled@1.14.0
 - flame_audio@2.1.0
 - flame_bloc@1.10.2
 - flame_fire_atlas@1.4.0
 - flame_forge2d@0.15.0
 - flame_isolate@0.5.0
 - flame_lint@1.1.1
 - flame_lottie@0.3.0
 - flame_markdown@0.1.1
 - flame_network_assets@0.2.0+5
 - flame_noise@0.1.1+5
 - flame_rive@1.9.2
 - flame_spine@0.1.1+2
 - flame_svg@1.8.2
 - jenny@1.1.0
2023-09-21 17:08:30 -03:00
477221998a feat(flame): Add helper methods to create frame data on SpriteSheet (#2754)
Add two methods to SpriteSheet to create frame data for SpriteAnimation
2023-09-21 11:34:02 +02:00
9c1e1c3098 chore: Remove deprecations for v1.9.0 (#2749)
Removes everything that was marked as deprecated and that should be
removed for v1.9.0.
2023-09-19 16:47:41 +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
27a8fd61cb refactor: Enable DCM linting (#2667)
This is a first step towards enabling DCM for Flame. Though I have tested with all rules, and am working on selecting, assessing, and fixing violations, as a first step, we can merge the infrastructural changes to flame_lint to and GitHub actions.
As a proof of concept, I am enabling two rules for which we have no violations.
I will followup with enabling more rules, adding discussions for controversial changes, and fixing non-controversial violations.
2023-08-24 13:09:26 +02:00
b26700df7e chore(release): Publish Flame 1.8.2 (#2643)
- flame@1.8.2
 - flame_lint@1.1.0
 - flame_rive@1.9.1
 - flame_tiled@1.13.0
 - flame_isolate@0.4.0+2
 - flame_audio@2.0.5
 - flame_spine@0.1.1+1
 - flame_svg@1.8.1
 - flame_test@1.12.1
 - flame_oxygen@0.1.8+5
 - flame_bloc@1.10.1
 - flame_fire_atlas@1.3.8
 - flame_forge2d@0.14.1+1
 - flame_noise@0.1.1+4
 - flame_network_assets@0.2.0+4
 - flame_lottie@0.2.1+1
2023-08-08 22:17:03 +02:00
c11fdb9940 chore(release): Publish flame v1.8.1 et. al (#2599)
- flame@1.8.1
 - flame_test@1.12.0
 - flame_audio@2.0.4
 - flame_bloc@1.10.0
 - flame_fire_atlas@1.3.7
 - flame_forge2d@0.14.1
 - flame_isolate@0.4.0+1
 - flame_lottie@0.2.1
 - flame_noise@0.1.1+3
 - flame_oxygen@0.1.8+4
 - flame_rive@1.9.0
 - flame_spine@0.1.1
 - flame_svg@1.8.0
 - flame_tiled@1.12.0
 - jenny@1.0.4
 - flame_network_assets@0.2.0+3
2023-07-02 13:40:15 +00:00
91fc18b1be docs: Enhance "adding the scrolling" section (#2559)
The update method should end up with the code in this order, otherwise the velocity is never set to 0.

Probably obvious but the rest of the steps were precise on where to include these code blocks.

May wanna add this full block to the end of this step as well, I spent a few minutes trying to figure out why it wasn't working propely.
2023-05-31 18:09:57 +00:00
973b5808dd chore(publish): Publish Flame v1.8.0 and bridge packages (#2557)
flame@1.8.0
flame_rive@1.8.0
flame_test@1.11.0
flame_audio@2.0.3
flame_bloc@1.9.0
flame_fire_atlas@1.3.6
flame_forge2d@0.14.0
flame_isolate@0.4.0
flame_lint@1.0.0
flame_lottie@0.2.0+3
flame_network_assets@0.2.0+2
flame_noise@0.1.1+2
flame_oxygen@0.1.8+3
flame_spine@0.1.0+1
flame_svg@1.7.4
flame_tiled@1.10.2
jenny@1.0.3
2023-05-28 18:55:47 +00:00
a54f19a405 chore(release): Publish packages (#2555)
- flame@1.8.0
 - flame_rive@1.8.0
 - flame_test@1.11.0
 - flame_audio@2.0.3
 - flame_bloc@1.9.0
 - flame_fire_atlas@1.3.6
 - flame_forge2d@0.14.0
 - flame_isolate@0.4.0
 - flame_lint@0.2.0+3
 - flame_lottie@0.2.0+3
 - flame_network_assets@0.2.0+2
 - flame_noise@0.1.1+2
 - flame_oxygen@0.1.8+3
 - flame_spine@0.1.0+1
 - flame_svg@1.7.4
 - flame_tiled@1.10.2
 - jenny@1.0.3
2023-05-28 18:24:36 +00:00
2f71e06eb8 fix: Update sdk constraints to >=3.0.0 (#2554)
Update the SDK constraint to use >= 3.0.0
2023-05-28 20:09:45 +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
b41622db8f fix: Solve warnings from 3.10.0 analyzer (#2532)
Just solves the warnings that the new Flutter version complains about (which makes us lose 10 points on pub).
2023-05-14 16:25:23 +02:00
89926227c5 feat: Accept CollisionType in hitbox constructor (#2509)
With this PR we accept the `CollisionType` directly in the constructor.
2023-04-18 13:57:16 +00:00
9591e28541 chore(release): Publish packages (#2504)
- flame@1.7.3
 - flame_audio@2.0.1
 - flame_bloc@1.8.4
 - flame_fire_atlas@1.3.5
 - flame_flare@1.5.4
 - flame_forge2d@0.13.0+1
 - flame_isolate@0.3.0+1
 - flame_lint@0.2.0+2
 - flame_oxygen@0.1.8+2
 - flame_rive@1.7.1
 - flame_svg@1.7.3
 - flame_test@1.10.1
 - flame_tiled@1.10.1
 - jenny@1.0.2
 - flame_noise@0.1.1+1
 - flame_network_assets@0.2.0+1
 - flame_lottie@0.2.0+2
2023-04-16 01:18:03 +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
ac878d8edf chore(release): Publish packages (#2462) 2023-04-02 20:06:47 +02:00
564799adc9 docs: Remove unnecessary async from code snippets (#2454)
Removed unnecessary async from code snippets.
2023-04-02 01:59:53 +02:00
63704c40ee docs: Added fix for building on Windows and resolved other build errors (#2395)
<!--
The title of your PR on the line above should start with a [Conventional
Commit] prefix
(`fix:`, `feat:`, `docs:`, `test:`, `chore:`, `refactor:`, `perf:`,
`build:`, `ci:`,
`style:`, `revert:`). This title will later become an entry in the
[CHANGELOG], so please
make sure that it summarizes the PR adequately.
-->

# Description
<!--
Provide a description of what this PR is doing.
If you're modifying existing behavior, describe the existing behavior,
how this PR is changing it,
and what motivated the change. If this is a breaking change, specify
explicitly which APIs were
changed.
-->

@eukleshnin identified issues with building the documents locally on a
Windows workstation. Namely, the following was occurring:

```
reading sources... [  2%] flame/layout/align_component
Exception occurred:

FileNotFoundError: [WinError 2]
```
This was determined to be a combination of several things.

1. In `dart_domain.py`, the `subprocess.run` calling dartdoc_json did
not have the shell parameter set to true. This solves the error about
the file not being found. This then generates errors that subsequent
references to the `temp_file` did not exist.
2. This was due to the default setting with Python `tempfile` where when
it determines the temp file has been closed, it deletes it; however, it
was still needed, so by setting the `delete=False` parameter, the file
would still remain.
3. Unfortunately, because it still remains, it needs to be deleted once
it is no longer needed. Trying to use `finally:` with the `try` block
failed to produce the results desired, so the temp file name was
registered with the class so it can be deleted in the original calling
function if it exists. This proved successful.
4. Although not critical, the same temp file uses a suffix of `json` so
it was creating files `xxxxjson`. By adding the "." in the suffix, it
creates valid file names now. This doesn't actually fix anything, it
just seemed wrong, so I fixed it to be valid files if ever needed down
the road.

Now that the docs built, there were several warnings that could be
resolved:
1. `Overlays.md` was not referenced in the TOC tree.
2. Since overlays were removed in
https://github.com/flame-engine/flame/pull/2384, the Platformer tutorial
had a link to the old path and it needed to be updated.

Finally and open for discussion, during this process of debugging, I
upgraded all packages to the most current to see what impacts there
were. The following is the old and new potential `requirements.txt`:

```
----Old
linkify-it-py==2.0.0
myst-parser==0.18.1
Pygments==2.12.0
Sphinx==5.0.2
sphinxcontrib-mermaid==0.8.1
sphinx-autobuild==2021.3.14
jinja2==3.1.2

----- New
linkify-it-py==2.0.0
myst-parser==1.0.0
Pygments==2.14.0
Sphinx==6.1.3
sphinxcontrib-mermaid==0.8.1
sphinx-autobuild==2021.3.14
Jinja2==3.1.2
```

The only byproduct of this upgrade was a deprecated package warning for
`attrs_image` in `conf.py` which was updated to `attrs_inline`. I made
that change initially for this PR, but backed it out as I didn't know if
there was a desire to update the `requirements.txt` and felt some
discussion may be warranted.

Regardless, with everything upgraded or left as is, the other fixes
resolve the issues on Windows.

## Checklist
<!--
Before you create this PR confirm that it meets all requirements listed
below by checking the
relevant checkboxes with `[x]`. If some checkbox is not applicable, mark
it as `[-]`.
-->

- [X] I have followed the [Contributor Guide] when preparing my PR.
- [ ] I have updated/added tests for ALL new/updated/fixed
functionality.
- [X] I have updated/added relevant documentation in `docs` and added
dartdoc comments with `///`.
- [ ] I have updated/added relevant examples in `examples` or `docs`.


## Breaking Change?
<!--
Would your PR require Flame users to update their apps following your
change?

If yes, then the title of the PR should include "!" (for example,
`feat!:`, `fix!:`). See
[Conventional Commit] for details. Also, for a breaking PR uncomment and
fill in the "Migration
instructions" section below.

### Migration instructions

If the PR is breaking, uncomment this header and add instructions for
how to migrate from the
currently released version to the new proposed way.
-->

- [ ] Yes, this PR is a breaking change.
- [X] No, this PR is not a breaking change.


## Related Issues
<!--
Indicate which issues this PR resolves, if any. For example:

Closes #1234
!-->

<!-- Links -->
[Contributor Guide]:
https://github.com/flame-engine/flame/blob/main/CONTRIBUTING.md
[Conventional Commit]: https://conventionalcommits.org
[CHANGELOG]:
https://github.com/flame-engine/flame/blob/main/CHANGELOG.md

---------

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2023-03-12 20:54:48 +00:00
7de8fe9b6a chore: Standardize and unify SDK versions across packages (#2374)
# Description

This does two things:

## Use double quotes for SDK constraints

Standardize the usage of single or double quotes to specify sdk
constraints across pubspecs
I see no reason this should not be kept consistent
I also see no reason to prefer one over the other, so I searched the
code base and there are 7 instances of single quote vs 32 of double
quotes, so I favored the later

## Update all SDK constraints to 2.18

Let me know if there are any issues with it, but I believe we should
keep this consistent across all packages.
Also there is a pubspec on root which imply all should be on 2.18
anyway.

## Checklist

- [x] I have followed the [Contributor Guide] when preparing my PR.
- [x] I have updated/added tests for ALL new/updated/fixed
functionality.
- [x] I have updated/added relevant documentation in `docs` and added
dartdoc comments with `///`.
- [x] I have updated/added relevant examples in `examples` or `docs`.

## Breaking Change?

- [ ] Yes, this PR is a breaking change.
- [x] No, this PR is not a breaking change.

<!-- Links -->
[Contributor Guide]:
https://github.com/flame-engine/flame/blob/main/CONTRIBUTING.md
[Conventional Commit]: https://conventionalcommits.org/
[CHANGELOG]:
https://github.com/flame-engine/flame/blob/main/CHANGELOG.md

Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
2023-03-01 18:08:13 +00:00