Run class

Running the app on a device: what is connected, what is free, what is already running where — across every worktree of the repo, not just this one — and launching an entry point onto it.

fw.use(Run(packages: [
  RunPackage(app, entrypoints: [
    Entrypoint('lib/main.dart', name: 'App'),
    Entrypoint('lib/main_staging.dart', name: 'Staging', knobs: [
      Knob('apiHost', from: ValueSource.hostAddresses),
      Knob('serverPort',
          from: ValueSource.script('tool/local_env.dart',
              args: ['port', 'server'])),
    ]),
  ]),
]));

The knobs are the entry point's own main({String apiHost = 'localhost', int serverPort = 8086}) — the config only annotates them. Changing one costs a hot restart rather than a rebuild, which is the whole difference from the --dart-defines this replaced.

ValueSource lists what a from: can work out for itself.

Offers no each, like LauncherIcon and for the same reason: only a package that is an app can be run onto a phone.

Inheritance

Constructors

Run({List<RunPackage> packages = const [], String? label})

Properties

config → Map<String, Object?>
Per-instance configuration, handed to the GUI-side implementation. Must be JSON-encodable — it crosses a process boundary.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable and globally unique — flutterware.scenarios, acme.deploy. The GUI resolves its native implementation by this string.
finalinherited
label → String
What the sidebar row says. Defaults to the last dotted segment of id.
finalinherited
packages → List<RunPackage>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited