Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[multiple] Avoid new unreachable_switch_default warning. #54996

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/web_ui/lib/src/engine/canvaskit/color_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,5 @@ CkColorFilter? createCkColorFilter(EngineColorFilter colorFilter) {
return const CkLinearToSrgbGammaColorFilter();
case ColorFilterType.srgbToLinearGamma:
return const CkSrgbToLinearGammaColorFilter();
default:
throw StateError('Unknown mode $colorFilter.type for ColorFilter.');
}
}
2 changes: 0 additions & 2 deletions lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,6 @@ class Mutator {
return matrix == typedOther.matrix;
case MutatorType.opacity:
return alpha == typedOther.alpha;
default:
return false;
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/web_ui/lib/src/engine/html/bitmap_canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,6 @@ String? stringForStrokeCap(ui.StrokeCap? strokeCap) {
case ui.StrokeCap.round:
return 'round';
case ui.StrokeCap.square:
default:
return 'square';
}
}
Expand All @@ -1349,7 +1348,6 @@ String stringForStrokeJoin(ui.StrokeJoin strokeJoin) {
case ui.StrokeJoin.bevel:
return 'bevel';
case ui.StrokeJoin.miter:
default:
return 'miter';
}
}
Expand Down
2 changes: 0 additions & 2 deletions lib/web_ui/lib/src/engine/html/shaders/shader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,5 @@ EngineHtmlColorFilter? createHtmlColorFilter(EngineColorFilter? colorFilter) {
throw UnimplementedError('ColorFilter.linearToSrgbGamma not implemented for HTML renderer');
case ColorFilterType.srgbToLinearGamma:
throw UnimplementedError('ColorFilter.srgbToLinearGamma not implemented for HTML renderer.');
default:
throw StateError('Unknown mode $colorFilter.type for ColorFilter.');
}
}
2 changes: 0 additions & 2 deletions lib/web_ui/lib/src/engine/text/paragraph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,6 @@ String? _decorationStyleToCssString(ui.TextDecorationStyle decorationStyle) {
return 'solid';
case ui.TextDecorationStyle.wavy:
return 'wavy';
default:
return null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class TextCapitalizationConfig {
case TextCapitalization.sentences:
autocapitalize = 'sentences';
case TextCapitalization.none:
default:
autocapitalize = 'off';
}
if (domInstanceOfString(domElement, 'HTMLInputElement')) {
Expand Down