|
|
|
@@ -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,TResult Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,TResult Function( BridgeEvent_PttCapability value)? pttCapability,TResult Function( BridgeEvent_VoiceState value)? voiceState,TResult Function( BridgeEvent_InterruptionState value)? interruptionState,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,TResult Function( BridgeEvent_PttCapability value)? pttCapability,TResult Function( BridgeEvent_VoiceState value)? voiceState,TResult Function( BridgeEvent_InterruptionState value)? interruptionState,TResult Function( BridgeEvent_PermissionState value)? permissionState,required TResult orElse(),}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
@@ -68,7 +68,8 @@ return audioStopped(_that);case BridgeEvent_SnapshotChanged() when snapshotChang
|
|
|
|
|
return snapshotChanged(_that);case BridgeEvent_PttCapability() when pttCapability != null:
|
|
|
|
|
return pttCapability(_that);case BridgeEvent_VoiceState() when voiceState != null:
|
|
|
|
|
return voiceState(_that);case BridgeEvent_InterruptionState() when interruptionState != null:
|
|
|
|
|
return interruptionState(_that);case _:
|
|
|
|
|
return interruptionState(_that);case BridgeEvent_PermissionState() when permissionState != null:
|
|
|
|
|
return permissionState(_that);case _:
|
|
|
|
|
return orElse();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -86,7 +87,7 @@ return interruptionState(_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,required TResult Function( BridgeEvent_SnapshotChanged value) snapshotChanged,required TResult Function( BridgeEvent_PttCapability value) pttCapability,required TResult Function( BridgeEvent_VoiceState value) voiceState,required TResult Function( BridgeEvent_InterruptionState value) interruptionState,}){
|
|
|
|
|
@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,required TResult Function( BridgeEvent_PttCapability value) pttCapability,required TResult Function( BridgeEvent_VoiceState value) voiceState,required TResult Function( BridgeEvent_InterruptionState value) interruptionState,required TResult Function( BridgeEvent_PermissionState value) permissionState,}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected():
|
|
|
|
@@ -99,7 +100,8 @@ return audioStopped(_that);case BridgeEvent_SnapshotChanged():
|
|
|
|
|
return snapshotChanged(_that);case BridgeEvent_PttCapability():
|
|
|
|
|
return pttCapability(_that);case BridgeEvent_VoiceState():
|
|
|
|
|
return voiceState(_that);case BridgeEvent_InterruptionState():
|
|
|
|
|
return interruptionState(_that);}
|
|
|
|
|
return interruptionState(_that);case BridgeEvent_PermissionState():
|
|
|
|
|
return permissionState(_that);}
|
|
|
|
|
}
|
|
|
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
|
|
|
///
|
|
|
|
@@ -113,7 +115,7 @@ return interruptionState(_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,TResult? Function( BridgeEvent_SnapshotChanged value)? snapshotChanged,TResult? Function( BridgeEvent_PttCapability value)? pttCapability,TResult? Function( BridgeEvent_VoiceState value)? voiceState,TResult? Function( BridgeEvent_InterruptionState value)? interruptionState,}){
|
|
|
|
|
@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,TResult? Function( BridgeEvent_PttCapability value)? pttCapability,TResult? Function( BridgeEvent_VoiceState value)? voiceState,TResult? Function( BridgeEvent_InterruptionState value)? interruptionState,TResult? Function( BridgeEvent_PermissionState value)? permissionState,}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
@@ -126,7 +128,8 @@ return audioStopped(_that);case BridgeEvent_SnapshotChanged() when snapshotChang
|
|
|
|
|
return snapshotChanged(_that);case BridgeEvent_PttCapability() when pttCapability != null:
|
|
|
|
|
return pttCapability(_that);case BridgeEvent_VoiceState() when voiceState != null:
|
|
|
|
|
return voiceState(_that);case BridgeEvent_InterruptionState() when interruptionState != null:
|
|
|
|
|
return interruptionState(_that);case _:
|
|
|
|
|
return interruptionState(_that);case BridgeEvent_PermissionState() when permissionState != null:
|
|
|
|
|
return permissionState(_that);case _:
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -143,7 +146,7 @@ return interruptionState(_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,TResult Function( int channels, int clients)? snapshotChanged,TResult Function( String level, String backendId, String boundInputClass)? pttCapability,TResult Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs)? voiceState,TResult Function( bool began, bool shouldResume)? interruptionState,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,TResult Function( String level, String backendId, String boundInputClass)? pttCapability,TResult Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs)? voiceState,TResult Function( bool began, bool shouldResume)? interruptionState,TResult Function( String permission, PermissionStateKind state)? permissionState,required TResult orElse(),}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
|
return connected(_that.serverName);case BridgeEvent_Lost() when lost != null:
|
|
|
|
@@ -155,7 +158,8 @@ return audioStopped();case BridgeEvent_SnapshotChanged() when snapshotChanged !=
|
|
|
|
|
return snapshotChanged(_that.channels,_that.clients);case BridgeEvent_PttCapability() when pttCapability != null:
|
|
|
|
|
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case BridgeEvent_VoiceState() when voiceState != null:
|
|
|
|
|
return voiceState(_that.inChannel,_that.transmitMode,_that.mute,_that.releaseTailMs);case BridgeEvent_InterruptionState() when interruptionState != null:
|
|
|
|
|
return interruptionState(_that.began,_that.shouldResume);case _:
|
|
|
|
|
return interruptionState(_that.began,_that.shouldResume);case BridgeEvent_PermissionState() when permissionState != null:
|
|
|
|
|
return permissionState(_that.permission,_that.state);case _:
|
|
|
|
|
return orElse();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -173,7 +177,7 @@ return interruptionState(_that.began,_that.shouldResume);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,required TResult Function( int channels, int clients) snapshotChanged,required TResult Function( String level, String backendId, String boundInputClass) pttCapability,required TResult Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs) voiceState,required TResult Function( bool began, bool shouldResume) interruptionState,}) {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,required TResult Function( String level, String backendId, String boundInputClass) pttCapability,required TResult Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs) voiceState,required TResult Function( bool began, bool shouldResume) interruptionState,required TResult Function( String permission, PermissionStateKind state) permissionState,}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected():
|
|
|
|
|
return connected(_that.serverName);case BridgeEvent_Lost():
|
|
|
|
@@ -185,7 +189,8 @@ return audioStopped();case BridgeEvent_SnapshotChanged():
|
|
|
|
|
return snapshotChanged(_that.channels,_that.clients);case BridgeEvent_PttCapability():
|
|
|
|
|
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case BridgeEvent_VoiceState():
|
|
|
|
|
return voiceState(_that.inChannel,_that.transmitMode,_that.mute,_that.releaseTailMs);case BridgeEvent_InterruptionState():
|
|
|
|
|
return interruptionState(_that.began,_that.shouldResume);}
|
|
|
|
|
return interruptionState(_that.began,_that.shouldResume);case BridgeEvent_PermissionState():
|
|
|
|
|
return permissionState(_that.permission,_that.state);}
|
|
|
|
|
}
|
|
|
|
|
/// A variant of `when` that fallback to returning `null`
|
|
|
|
|
///
|
|
|
|
@@ -199,7 +204,7 @@ return interruptionState(_that.began,_that.shouldResume);}
|
|
|
|
|
/// }
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
|
|
@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,TResult? Function( String level, String backendId, String boundInputClass)? pttCapability,TResult? Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs)? voiceState,TResult? Function( bool began, bool shouldResume)? interruptionState,}) {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,TResult? Function( String level, String backendId, String boundInputClass)? pttCapability,TResult? Function( bool inChannel, BridgeTransmitMode transmitMode, bool mute, int releaseTailMs)? voiceState,TResult? Function( bool began, bool shouldResume)? interruptionState,TResult? Function( String permission, PermissionStateKind state)? permissionState,}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case BridgeEvent_Connected() when connected != null:
|
|
|
|
|
return connected(_that.serverName);case BridgeEvent_Lost() when lost != null:
|
|
|
|
@@ -211,7 +216,8 @@ return audioStopped();case BridgeEvent_SnapshotChanged() when snapshotChanged !=
|
|
|
|
|
return snapshotChanged(_that.channels,_that.clients);case BridgeEvent_PttCapability() when pttCapability != null:
|
|
|
|
|
return pttCapability(_that.level,_that.backendId,_that.boundInputClass);case BridgeEvent_VoiceState() when voiceState != null:
|
|
|
|
|
return voiceState(_that.inChannel,_that.transmitMode,_that.mute,_that.releaseTailMs);case BridgeEvent_InterruptionState() when interruptionState != null:
|
|
|
|
|
return interruptionState(_that.began,_that.shouldResume);case _:
|
|
|
|
|
return interruptionState(_that.began,_that.shouldResume);case BridgeEvent_PermissionState() when permissionState != null:
|
|
|
|
|
return permissionState(_that.permission,_that.state);case _:
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -845,6 +851,76 @@ as bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BridgeEvent_PermissionState extends BridgeEvent {
|
|
|
|
|
const BridgeEvent_PermissionState({required this.permission, required this.state}): super._();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Canonical Android permission identifier.
|
|
|
|
|
final String permission;
|
|
|
|
|
/// Resolved permission state.
|
|
|
|
|
final PermissionStateKind state;
|
|
|
|
|
|
|
|
|
|
/// 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_PermissionStateCopyWith<BridgeEvent_PermissionState> get copyWith => _$BridgeEvent_PermissionStateCopyWithImpl<BridgeEvent_PermissionState>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is BridgeEvent_PermissionState&&(identical(other.permission, permission) || other.permission == permission)&&(identical(other.state, state) || other.state == state));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType,permission,state);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'BridgeEvent.permissionState(permission: $permission, state: $state)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract mixin class $BridgeEvent_PermissionStateCopyWith<$Res> implements $BridgeEventCopyWith<$Res> {
|
|
|
|
|
factory $BridgeEvent_PermissionStateCopyWith(BridgeEvent_PermissionState value, $Res Function(BridgeEvent_PermissionState) _then) = _$BridgeEvent_PermissionStateCopyWithImpl;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
String permission, PermissionStateKind state
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class _$BridgeEvent_PermissionStateCopyWithImpl<$Res>
|
|
|
|
|
implements $BridgeEvent_PermissionStateCopyWith<$Res> {
|
|
|
|
|
_$BridgeEvent_PermissionStateCopyWithImpl(this._self, this._then);
|
|
|
|
|
|
|
|
|
|
final BridgeEvent_PermissionState _self;
|
|
|
|
|
final $Res Function(BridgeEvent_PermissionState) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of BridgeEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline') $Res call({Object? permission = null,Object? state = null,}) {
|
|
|
|
|
return _then(BridgeEvent_PermissionState(
|
|
|
|
|
permission: null == permission ? _self.permission : permission // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as PermissionStateKind,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dart format on
|
|
|
|
|