|
|
|
@@ -55,7 +55,7 @@ extension BridgeEventPatterns on BridgeEvent {
|
|
|
|
|
/// }
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
|
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( BridgeEvent_Connected value)? connected,TResult Function( BridgeEvent_Lost value)? lost,TResult Function( BridgeEvent_Reconnecting value)? reconnecting,TResult Function( BridgeEvent_Disconnected value)? disconnected,TResult Function( BridgeEvent_AudioStarted value)? audioStarted,TResult Function( BridgeEvent_AudioStopped value)? audioStopped,required TResult orElse(),}){
|
|
|
|
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( BridgeEvent_Connected value)? connected,TResult Function( BridgeEvent_Lost value)? lost,TResult Function( BridgeEvent_Reconnecting value)? reconnecting,TResult Function( BridgeEvent_Disconnected value)? disconnected,TResult Function( BridgeEvent_AudioStarted value)? audioStarted,TResult Function( BridgeEvent_AudioStopped value)? audioStopped,TResult Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,required TResult orElse(),}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
@@ -64,7 +64,8 @@ return lost(_that);case BridgeEvent_Reconnecting() when reconnecting != null:
|
|
|
|
|
return reconnecting(_that);case BridgeEvent_Disconnected() when disconnected != null:
|
|
|
|
|
return disconnected(_that);case BridgeEvent_AudioStarted() when audioStarted != null:
|
|
|
|
|
return audioStarted(_that);case BridgeEvent_AudioStopped() when audioStopped != null:
|
|
|
|
|
return audioStopped(_that);case _:
|
|
|
|
|
return audioStopped(_that);case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
|
|
|
|
return snapshotChanged(_that);case _:
|
|
|
|
|
return orElse();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -82,7 +83,7 @@ return audioStopped(_that);case _:
|
|
|
|
|
/// }
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
|
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( BridgeEvent_Connected value) connected,required TResult Function( BridgeEvent_Lost value) lost,required TResult Function( BridgeEvent_Reconnecting value) reconnecting,required TResult Function( BridgeEvent_Disconnected value) disconnected,required TResult Function( BridgeEvent_AudioStarted value) audioStarted,required TResult Function( BridgeEvent_AudioStopped value) audioStopped,}){
|
|
|
|
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( BridgeEvent_Connected value) connected,required TResult Function( BridgeEvent_Lost value) lost,required TResult Function( BridgeEvent_Reconnecting value) reconnecting,required TResult Function( BridgeEvent_Disconnected value) disconnected,required TResult Function( BridgeEvent_AudioStarted value) audioStarted,required TResult Function( BridgeEvent_AudioStopped value) audioStopped,required TResult Function( BridgeEvent_SnapshotChanged value) snapshotChanged,}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected():
|
|
|
|
@@ -91,7 +92,8 @@ return lost(_that);case BridgeEvent_Reconnecting():
|
|
|
|
|
return reconnecting(_that);case BridgeEvent_Disconnected():
|
|
|
|
|
return disconnected(_that);case BridgeEvent_AudioStarted():
|
|
|
|
|
return audioStarted(_that);case BridgeEvent_AudioStopped():
|
|
|
|
|
return audioStopped(_that);}
|
|
|
|
|
return audioStopped(_that);case BridgeEvent_SnapshotChanged():
|
|
|
|
|
return snapshotChanged(_that);}
|
|
|
|
|
}
|
|
|
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
|
|
|
///
|
|
|
|
@@ -105,7 +107,7 @@ return audioStopped(_that);}
|
|
|
|
|
/// }
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
|
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( BridgeEvent_Connected value)? connected,TResult? Function( BridgeEvent_Lost value)? lost,TResult? Function( BridgeEvent_Reconnecting value)? reconnecting,TResult? Function( BridgeEvent_Disconnected value)? disconnected,TResult? Function( BridgeEvent_AudioStarted value)? audioStarted,TResult? Function( BridgeEvent_AudioStopped value)? audioStopped,}){
|
|
|
|
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( BridgeEvent_Connected value)? connected,TResult? Function( BridgeEvent_Lost value)? lost,TResult? Function( BridgeEvent_Reconnecting value)? reconnecting,TResult? Function( BridgeEvent_Disconnected value)? disconnected,TResult? Function( BridgeEvent_AudioStarted value)? audioStarted,TResult? Function( BridgeEvent_AudioStopped value)? audioStopped,TResult? Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
@@ -114,7 +116,8 @@ return lost(_that);case BridgeEvent_Reconnecting() when reconnecting != null:
|
|
|
|
|
return reconnecting(_that);case BridgeEvent_Disconnected() when disconnected != null:
|
|
|
|
|
return disconnected(_that);case BridgeEvent_AudioStarted() when audioStarted != null:
|
|
|
|
|
return audioStarted(_that);case BridgeEvent_AudioStopped() when audioStopped != null:
|
|
|
|
|
return audioStopped(_that);case _:
|
|
|
|
|
return audioStopped(_that);case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
|
|
|
|
return snapshotChanged(_that);case _:
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -131,7 +134,7 @@ return audioStopped(_that);case _:
|
|
|
|
|
/// }
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
|
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( String serverName)? connected,TResult Function( String reason)? lost,TResult Function( int attempt, int delaySecs)? reconnecting,TResult Function( String reason)? disconnected,TResult Function()? audioStarted,TResult Function()? audioStopped,required TResult orElse(),}) {final _that = this;
|
|
|
|
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( String serverName)? connected,TResult Function( String reason)? lost,TResult Function( int attempt, int delaySecs)? reconnecting,TResult Function( String reason)? disconnected,TResult Function()? audioStarted,TResult Function()? audioStopped,TResult Function( int channels, int clients)? snapshotChanged,required TResult orElse(),}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
|
return connected(_that.serverName);case BridgeEvent_Lost() when lost != null:
|
|
|
|
@@ -139,7 +142,8 @@ return lost(_that.reason);case BridgeEvent_Reconnecting() when reconnecting != n
|
|
|
|
|
return reconnecting(_that.attempt,_that.delaySecs);case BridgeEvent_Disconnected() when disconnected != null:
|
|
|
|
|
return disconnected(_that.reason);case BridgeEvent_AudioStarted() when audioStarted != null:
|
|
|
|
|
return audioStarted();case BridgeEvent_AudioStopped() when audioStopped != null:
|
|
|
|
|
return audioStopped();case _:
|
|
|
|
|
return audioStopped();case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
|
|
|
|
return snapshotChanged(_that.channels,_that.clients);case _:
|
|
|
|
|
return orElse();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -157,7 +161,7 @@ return audioStopped();case _:
|
|
|
|
|
/// }
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
|
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( String serverName) connected,required TResult Function( String reason) lost,required TResult Function( int attempt, int delaySecs) reconnecting,required TResult Function( String reason) disconnected,required TResult Function() audioStarted,required TResult Function() audioStopped,}) {final _that = this;
|
|
|
|
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( String serverName) connected,required TResult Function( String reason) lost,required TResult Function( int attempt, int delaySecs) reconnecting,required TResult Function( String reason) disconnected,required TResult Function() audioStarted,required TResult Function() audioStopped,required TResult Function( int channels, int clients) snapshotChanged,}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected():
|
|
|
|
|
return connected(_that.serverName);case BridgeEvent_Lost():
|
|
|
|
@@ -165,7 +169,8 @@ return lost(_that.reason);case BridgeEvent_Reconnecting():
|
|
|
|
|
return reconnecting(_that.attempt,_that.delaySecs);case BridgeEvent_Disconnected():
|
|
|
|
|
return disconnected(_that.reason);case BridgeEvent_AudioStarted():
|
|
|
|
|
return audioStarted();case BridgeEvent_AudioStopped():
|
|
|
|
|
return audioStopped();}
|
|
|
|
|
return audioStopped();case BridgeEvent_SnapshotChanged():
|
|
|
|
|
return snapshotChanged(_that.channels,_that.clients);}
|
|
|
|
|
}
|
|
|
|
|
/// A variant of `when` that fallback to returning `null`
|
|
|
|
|
///
|
|
|
|
@@ -179,7 +184,7 @@ return audioStopped();}
|
|
|
|
|
/// }
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
|
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( String serverName)? connected,TResult? Function( String reason)? lost,TResult? Function( int attempt, int delaySecs)? reconnecting,TResult? Function( String reason)? disconnected,TResult? Function()? audioStarted,TResult? Function()? audioStopped,}) {final _that = this;
|
|
|
|
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( String serverName)? connected,TResult? Function( String reason)? lost,TResult? Function( int attempt, int delaySecs)? reconnecting,TResult? Function( String reason)? disconnected,TResult? Function()? audioStarted,TResult? Function()? audioStopped,TResult? Function( int channels, int clients)? snapshotChanged,}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
|
return connected(_that.serverName);case BridgeEvent_Lost() when lost != null:
|
|
|
|
@@ -187,7 +192,8 @@ return lost(_that.reason);case BridgeEvent_Reconnecting() when reconnecting != n
|
|
|
|
|
return reconnecting(_that.attempt,_that.delaySecs);case BridgeEvent_Disconnected() when disconnected != null:
|
|
|
|
|
return disconnected(_that.reason);case BridgeEvent_AudioStarted() when audioStarted != null:
|
|
|
|
|
return audioStarted();case BridgeEvent_AudioStopped() when audioStopped != null:
|
|
|
|
|
return audioStopped();case _:
|
|
|
|
|
return audioStopped();case BridgeEvent_SnapshotChanged() when snapshotChanged != null:
|
|
|
|
|
return snapshotChanged(_that.channels,_that.clients);case _:
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -530,4 +536,74 @@ String toString() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BridgeEvent_SnapshotChanged extends BridgeEvent {
|
|
|
|
|
const BridgeEvent_SnapshotChanged({required this.channels, required this.clients}): super._();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Latest channel count.
|
|
|
|
|
final int channels;
|
|
|
|
|
/// Latest client count.
|
|
|
|
|
final int clients;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of BridgeEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$BridgeEvent_SnapshotChangedCopyWith<BridgeEvent_SnapshotChanged> get copyWith => _$BridgeEvent_SnapshotChangedCopyWithImpl<BridgeEvent_SnapshotChanged>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is BridgeEvent_SnapshotChanged&&(identical(other.channels, channels) || other.channels == channels)&&(identical(other.clients, clients) || other.clients == clients));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType,channels,clients);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'BridgeEvent.snapshotChanged(channels: $channels, clients: $clients)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract mixin class $BridgeEvent_SnapshotChangedCopyWith<$Res> implements $BridgeEventCopyWith<$Res> {
|
|
|
|
|
factory $BridgeEvent_SnapshotChangedCopyWith(BridgeEvent_SnapshotChanged value, $Res Function(BridgeEvent_SnapshotChanged) _then) = _$BridgeEvent_SnapshotChangedCopyWithImpl;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
int channels, int clients
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class _$BridgeEvent_SnapshotChangedCopyWithImpl<$Res>
|
|
|
|
|
implements $BridgeEvent_SnapshotChangedCopyWith<$Res> {
|
|
|
|
|
_$BridgeEvent_SnapshotChangedCopyWithImpl(this._self, this._then);
|
|
|
|
|
|
|
|
|
|
final BridgeEvent_SnapshotChanged _self;
|
|
|
|
|
final $Res Function(BridgeEvent_SnapshotChanged) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of BridgeEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline') $Res call({Object? channels = null,Object? clients = null,}) {
|
|
|
|
|
return _then(BridgeEvent_SnapshotChanged(
|
|
|
|
|
channels: null == channels ? _self.channels : channels // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int,clients: null == clients ? _self.clients : clients // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dart format on
|
|
|
|
|