PrivCommandEvent class sealed

A single event emitted while consuming a command as a stream.

PrivCommandExit is always the last event of a stream, emitted after both output streams have reached EOF.

Available extensions
Annotations
  • @freezed

Constructors

PrivCommandEvent.exit({required int exitCode})
The final event, emitted after both output streams reach EOF.
const
factory
PrivCommandEvent.stderr({required Uint8List bytes})
A chunk read from standard error.
const
factory
PrivCommandEvent.stdout({required Uint8List bytes})
A chunk read from standard output.
const
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult stdout(PrivCommandStdout value), required TResult stderr(PrivCommandStderr value), required TResult exit(PrivCommandExit value)}) → TResult

Available on PrivCommandEvent, provided by the PrivCommandEventPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? stdout(PrivCommandStdout value)?, TResult? stderr(PrivCommandStderr value)?, TResult? exit(PrivCommandExit value)?}) → TResult?

Available on PrivCommandEvent, provided by the PrivCommandEventPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult stdout(PrivCommandStdout value)?, TResult stderr(PrivCommandStderr value)?, TResult exit(PrivCommandExit value)?, required TResult orElse()}) → TResult

Available on PrivCommandEvent, provided by the PrivCommandEventPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult stdout(Uint8List bytes)?, TResult stderr(Uint8List bytes)?, TResult exit(int exitCode)?, required TResult orElse()}) → TResult

Available on PrivCommandEvent, provided by the PrivCommandEventPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult stdout(Uint8List bytes), required TResult stderr(Uint8List bytes), required TResult exit(int exitCode)}) → TResult

Available on PrivCommandEvent, provided by the PrivCommandEventPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? stdout(Uint8List bytes)?, TResult? stderr(Uint8List bytes)?, TResult? exit(int exitCode)?}) → TResult?

Available on PrivCommandEvent, provided by the PrivCommandEventPatterns extension

A variant of when that fallback to returning null

Operators

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