Skip to content

feat!: Rename Game.paused to Game.isPaused - #3992

Open
spydon wants to merge 1 commit into
mainfrom
rename-game-paused-to-is-paused
Open

feat!: Rename Game.paused to Game.isPaused#3992
spydon wants to merge 1 commit into
mainfrom
rename-game-paused-to-is-paused

Conversation

@spydon

@spydon spydon commented Aug 9, 2026

Copy link
Copy Markdown
Member

Description

Renames the paused getter and setter on Game to isPaused, so that it follows the same
is-prefix convention as the other boolean properties in Flame (isMounted, isLoaded,
isAttached, Effect.isPaused, etc.).

The behavior is completely unchanged, only the name is different. The private backing field was
renamed from _paused to _isPaused accordingly, and the dartdocs on the getter/setter were
cleaned up (the getter doc previously read "Returns is the engine if currently paused or running").

All usages were updated across flame (GameRenderBox, GameWidget, FlameGame, the devtools
game loop connector), flame_console (pause/resume commands), the examples and the docs. The
paused key used by the devtools service extension protocol is left as-is since it is a wire
format, not a public Dart API.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • 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?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Migration instructions

Replace every usage of game.paused with game.isPaused:

// Before
if (game.paused) {
  game.paused = false;
}

// After
if (game.isPaused) {
  game.isPaused = false;
}

Related Issues

Closes #3991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

game.paused -> game.isPaused

1 participant