LiveShell class

metro live: a prompt connected to the running app.

Live commands drop their metro live: prefix inside the shell, and run on connections that stay open between commands. When its input isn't a terminal, the shell runs each line as a script instead.

Constructors

LiveShell({required LiveRunner runner, required LiveSession session, required LiveShellDispatch dispatch, required List<LiveShellCommand> commands, required Stream<List<int>> input, required StringSink output, LiveOptions options = const LiveOptions(), List<LiveManifestEntry> appCommands = const [], LiveTerminal terminal = const StdioLiveTerminal(), String? historyPath, Stream<ProcessSignal>? interrupts})
Creates a shell that runs commands with dispatch on session's apps.
LiveShell.forProject({required LiveOptions options, required LiveShellDispatch dispatch, required List<LiveShellCommand> commands})
A shell for the Flutter project in the current directory.
factory

Properties

appCommands List<LiveManifestEntry>
The project's live commands from commands.json.
final
commands List<LiveShellCommand>
The live commands, for help and Tab.
final
dispatch LiveShellDispatch
Runs a command that isn't one of the shell's own.
final
hashCode int
The hash code for this object.
no setterinherited
historyPath String?
Where earlier commands are saved, or null to not save them.
final
options LiveOptions
-d and --all given to metro live.
final
runner LiveRunner
Runs commands and prints their output.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session LiveSession
The apps commands run on.
final
terminal LiveTerminal
The terminal the prompt is drawn on.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() Future<int>
Runs the shell until exit, Ctrl+D or the end of the input, and returns the exit code.
toString() String
A string representation of this object.
inherited

Operators

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