flutter3d_editor_play 1.0.0-rc.2
flutter3d_editor_play: ^1.0.0-rc.2 copied to clipboard
Outside the 1.0 semver promise. Play from a level editor: the game a level belongs to run with `flutter run --machine`, reloaded, stopped, and handed a saved level.
1.0.0-rc.2 #
Since the 2026-10-14 upload, the Play panel can be tested.
ScriptedPlayedGame is a run a test drives. A run's dispose is
close, and the results that were records are final classes, which
dart fix and migrate rewrite. The entry below says why this package
stays outside the 1.0 promise.
-
ScriptedPlayedGame, a run for testing the Play panel. It starts throughPlayStartingtoPlayRunning, or stops at -1 saying why, answers a hot reload only while running, numbers its events across runs and caps its console asFlutterRunandAttachedRundo. -
Breaking:
PlayedGame.dispose,AttachedRun.disposeandFlutterRun.disposeareclose.dispose()is synchronous, as Flutter's is, and an end that has to be waited for isFuture<void> close(): aFuturefromdisposewas left unawaited by every caller that wrote it in a widget's owndispose.dart fixrenames the calls and the overrides. -
The engine's number, outside the 1.0 promise. Its signatures carry types of a package before 1.0 or of one that takes a major a year, so a release of that package may break this API in a minor, and the break is labelled here. SUPPORT.md names the four packages outside the promise; the number says which engine release this one goes with, and every pin the engine writes on it is the engine's own.
-
Breaking: results that were records are final classes.
callGameExtension,eventsSinceandfakeFlutterRunanswered or held a record, which can never gain a field. Each answers a final class now, with the record's field names (a positional$1has a name of its own),==andhashCode. A field read compiles as before; a destructuring pattern names the class, andflutter3d_build:migraterewrites the$1reads. -
Breaking:
GameEventLogis made by a run, which fills it from the game it attached to. -
FakeGame.poststakesdata:andtime:by name, so an event can gain a field without a third position. -
PlayStateisabstract finalrather than sealed, so a phase a later minor adds breaks noswitchover it. -
A device id is checked before it reaches
flutter run -d.isFlutterDeviceId(new) holds an id to letters, digits,.,_,:and-;FlutterRun.startrefuses another, since on Windowsflutterruns throughcmd.exe, andparseFlutterDevicesleaves such an entry out. -
Breaking:
GameEventLog.takeisrecord.PlayedGame.stopstays besidedispose: it is a state transition (startmay follow), and its doc now says so. -
1.0.0 is a promise: strict semver from there. This release candidate already keeps it. A patch fixes bugs and breaks nothing, a minor adds, and a break waits for a major. The whole public API is stable, with no experimental exceptions, and is held to the snapshot in
api/. A deprecated name stays until the next major and for at least six months, and says what replaces it. CONTRIBUTING.md has the rules, and SUPPORT.md says which releases get fixes and on which platforms. -
**Breaking:
PlayedGamecan no longer be implemented outside their own library: it is anabstract base mixin classnow, so a game or a test mixes it in (with) and its class isfinalorbase. A member added to it in a 1.x release arrives with a body, which animplementscould not have taken without breaking somebody. -
The first publication. The 0.8.0 the pubspec carried was a number inside the workspace and never reached pub.dev. The package goes out on the shelf's number, so
^1.0.0on it resolves against every otherflutter3d_*package. -
The events a game posts, beside its console.
PlayedGame.eventskeeps what the game posted withflutter3d_game'spostToolEvent— a level loaded, the player died — each aPostedEventwith a sequence number, its kind without theflutter3d.prefix, a time and its data, capped at 2000 like the console.AttachedRunlistens to the VM service'sExtensionstream on the socket it already has;FlutterRunopens one at the addressapp.debugPortreports, since the daemon carries prints and not posts, and drops it when the game exits.eventsSincereads the list by cursor, with the next cursor, how many the cap dropped unread, and a restart from the first for a cursor past the end. -
FakeGame.postsis the game posting an event, andfakeFlutterRuntakes theFakeGameits run finds at the reported address. -
callGameExtensionasks a running game for one of its extensions. It finds the isolate that registered it and returns the game's own answer or the reason it refused. -
A save goes to the running game as a patch.
pushLevel(base:)sends the patch frombaseto the saved document when the game hasext.flutter3d.level.patchand the patch is shorter, and the whole document when the game answers that the patch is stale; the answer then carriesfellBack, whichdescribeLevelAppliedputs at the end of its line.levelPatchArgumentsbuilds the parameters. -
AttachedRunplays a game somebody else started, by its VM service address: the console (with what the game printed before the attach, which DDS replays), hot reload and restart through the services the flutter tool registers on the game, and stop as a detach that leaves the game running. It is the only Play a browser has, and the editor's attach button on a desktop uses it too.PlayedGameis what it andFlutterRunboth are, so one panel shows either;PlayStatemoves tosrc/play_state.dart, andPlayStoppedtakes areasonfor an end with no exit code. -
package:flutter3d_editor_play/attach.dart: everything here that starts no process —AttachedRun,pushLevel,connectVmService,PlayState,Watched— with nodart:ioanywhere under it, which a test walks the imports to check. -
connectVmServiceinstead ofvmServiceConnectUri, overweb_socket_channel, so a level is sent from a browser as well;vmServiceWebSocketreads thehttp://address a game prints as well as thews://…/wsone.pushLeveltakes aconnectfor tests. -
FakeGameandfakeAttachedRunintesting.dart: a VM service with a flutter tool on it, or without one, that a test controls. -
A stop on Windows ends the tool, not only its shell.
flutterthere starts throughcmd.exe, andProcess.killleft the Dart process behind it building; a stop before the game has started now runstaskkill /t.FlutterRuntakes the kill as a parameter, andtreeKillCommandsays which command a platform needs. -
Play leaves the editor application.
FlutterRun,projectRootForandpushLevelmove here fromapps/flutter3d_editor/lib/src/play, withWatchedin place of Flutter'sValueNotifier, so the editor's MCP server runs the same Play.FlutterRun.deviceis settable between runs, andhotSwap/hotRestartreturn what the tool said. -
flutterDeviceslists whatflutter run -dcan be given, fromflutter devices --machine, reading past whatever the tool prints first and leaving out devices it marks unsupported. -
package:flutter3d_editor_play/testing.dart:FakeFlutterToolandfakeFlutterRun, aflutter run --machinea test controls.
Its flutter3d_* dependencies ask for ^1.0.0.