File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
packages/stream_video/lib/src Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1+ import 'package:equatable/equatable.dart' ;
2+
13/// The type of call to be made.
24///
35/// The default type is [StreamCallType()] which is a normal call.
1012/// ```dart
1113/// StreamCallType.custom('custom_type');
1214/// ```
13- class StreamCallType {
14- const StreamCallType ._(this .value );
15+ class StreamCallType with EquatableMixin {
16+ factory StreamCallType () => const StreamCallType ._('default' );
1517
16- final String value;
18+ const StreamCallType ._( this . value) ;
1719
18- factory StreamCallType () => const StreamCallType ._('default' );
1920 factory StreamCallType .liveStream () => const StreamCallType ._('livestream' );
2021 factory StreamCallType .development () => const StreamCallType ._('development' );
2122 factory StreamCallType .audioRoom () => const StreamCallType ._('audio_room' );
@@ -36,4 +37,12 @@ class StreamCallType {
3637 return StreamCallType .custom (type);
3738 }
3839 }
40+
41+ final String value;
42+
43+ @override
44+ String toString () => value;
45+
46+ @override
47+ List <Object ?> get props => [value];
3948}
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ import '../call/call_type.dart';
66@immutable
77class StreamCallCid with EquatableMixin {
88 factory StreamCallCid ({
9- required String cid
9+ required String cid,
1010 }) {
1111 final typeAndId = cid.split (':' );
1212 if (typeAndId.length != 2 ) {
1313 throw FormatException ('invalid cid format: $cid ' );
1414 }
15-
15+
1616 return StreamCallCid ._(
1717 value: cid,
1818 type: StreamCallType .fromString (typeAndId.first),
You can’t perform that action at this time.
0 commit comments