FakeTcccCall constructor
FakeTcccCall({
- String callId = 'fake-call',
- String channelId = '10086',
- DateTime? startedAt,
- TcccCallSnapshot? status,
- TcccCallResult? result,
- TcccOutcome dtmfResultBuilder(
- String digit
Implementation
FakeTcccCall({
this.callId = 'fake-call',
this.channelId = '10086',
DateTime? startedAt,
TcccCallSnapshot? status,
TcccCallResult? result,
this.dtmfResultBuilder,
}) : startedAt = startedAt ?? DateTime.utc(2026, 1, 1, 12),
_result = result,
_statusNotifier = ValueNotifier<TcccCallSnapshot>(
status ??
TcccCallSnapshot(
state: TcccCallState.preparing,
callId: callId,
channelId: channelId,
callStartedAt: startedAt ?? DateTime.utc(2026, 1, 1, 12),
),
),
_ended = Completer<TcccCallResult>() {
_events = StreamController<TcccEvent>.broadcast(sync: true);
if (result != null && !_ended.isCompleted) {
_ended.complete(result);
}
}