Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/flame/flame.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Flame

- [Getting Started](../README.md)
- [Migration Guides](migration.md)
- [Game Widget](game_widget.md)
- [The game class](game.md)
- [Assets Structure](structure.md)
Expand All @@ -20,6 +21,7 @@
:hidden:

Getting Started <../README.md>
Migration Guides <migration.md>
Game Widget <game_widget.md>
The game class <game.md>
Assets Structure <structure.md>
Expand Down
27 changes: 27 additions & 0 deletions doc/flame/migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Migration Guides

This section describes the breaking changes that you need to be aware of when upgrading between
major versions of Flame, together with the steps required to migrate your code.


## Migrating from v1.38.0 to v2.0.0


### `GameWidget.controlled` renamed to `GameWidget.managed`

The `GameWidget.controlled` constructor has been renamed to `GameWidget.managed`. The behavior is
unchanged; only the name is different.

Replace every usage of `GameWidget.controlled` with `GameWidget.managed`:

```dart
// Before
GameWidget.controlled(
gameFactory: MyGame.new,
);

// After
GameWidget.managed(
gameFactory: MyGame.new,
);
```
Loading