Skip to content

Commit

Permalink
minor component fixes (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brazol authored Sep 25, 2024
1 parent 7dc91c6 commit 6c59922
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
10 changes: 6 additions & 4 deletions packages/stream_video/lib/src/errors/video_error_composer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import 'video_error.dart';
mixin VideoErrors {
/// Composes [VideoError] instance.
static VideoError compose(Object? exception, [StackTrace? stackTrace]) {
if (exception is String && stackTrace != null) {
return VideoError(message: exception);
} else if (exception is String) {
return VideoError(message: exception);
if (exception is String) {
return VideoError(
message: exception,
stackTrace: stackTrace,
);
} else if (exception is TwirpError) {
return VideoErrorWithCause(
message: exception.getMsg,
Expand All @@ -32,6 +33,7 @@ mixin VideoErrors {
} else {
return VideoError(
message: 'Unexpected error: $exception',
stackTrace: stackTrace,
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class StreamCallControls extends StatelessWidget {
spacing: spacing,
padding: padding,
borderRadius: borderRadius,
backgroundColor: backgroundColor,
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ import '../../../stream_video_flutter_background.dart';
import '../call_diagnostics_content/call_diagnostics_content.dart';

/// Builder used to create a custom call app bar.
typedef CallAppBarBuilder = PreferredSizeWidget Function(
BuildContext context,
Call call,
CallState callState,
);

/// Builder used to create a custom call app bar in landscape mode.
typedef OverlayAppBarBuilder = Widget Function(
typedef CallAppBarBuilder = PreferredSizeWidget? Function(
BuildContext context,
Call call,
CallState callState,
Expand Down Expand Up @@ -45,7 +38,6 @@ class StreamCallContent extends StatefulWidget {
this.onBackPressed,
this.onLeaveCallTap,
this.callAppBarBuilder,
this.overlayAppBarBuilder,
this.callParticipantsBuilder,
this.callControlsBuilder,
this.layoutMode = ParticipantLayoutMode.grid,
Expand All @@ -67,9 +59,6 @@ class StreamCallContent extends StatefulWidget {
/// Builder used to create a custom call app bar.
final CallAppBarBuilder? callAppBarBuilder;

/// Builder used to create a custom call app bar in landscape mode.
final OverlayAppBarBuilder? overlayAppBarBuilder;

/// Builder used to create a custom participants grid.
final CallParticipantsBuilder? callParticipantsBuilder;

Expand Down

0 comments on commit 6c59922

Please sign in to comment.