Unverified Commit 3315b257 authored by Qun Cheng's avatar Qun Cheng Committed by GitHub

Make search view shape clip the view content (#125161)

Fixes #124426

This PR is to make the search view shape clip the view content.

Before: the highlight and the "i" of "item 9" are not clipped by the shape.

<img width="350" alt="Screenshot 2023-04-19 at 12 09 48 PM" src="https://user-images.githubusercontent.com/36861262/233201222-468820a9-8717-4b6c-8528-8125a40fc161.png">

After:

<img width="350" alt="Screenshot 2023-04-19 at 2 13 52 PM" src="https://user-images.githubusercontent.com/36861262/233201609-81f5a942-2390-4081-a9c7-c9523a7f9e72.png">
parent 8ed26d8b
...@@ -777,6 +777,7 @@ class _ViewContentState extends State<_ViewContent> { ...@@ -777,6 +777,7 @@ class _ViewContentState extends State<_ViewContent> {
width: _viewRect.width, width: _viewRect.width,
height: _viewRect.height, height: _viewRect.height,
child: Material( child: Material(
clipBehavior: Clip.antiAlias,
shape: effectiveShape, shape: effectiveShape,
color: effectiveBackgroundColor, color: effectiveBackgroundColor,
surfaceTintColor: effectiveSurfaceTint, surfaceTintColor: effectiveSurfaceTint,
......
...@@ -755,6 +755,7 @@ void main() { ...@@ -755,6 +755,7 @@ void main() {
expect(material.elevation, 6.0); expect(material.elevation, 6.0);
expect(material.color, colorScheme.surface); expect(material.color, colorScheme.surface);
expect(material.surfaceTintColor, colorScheme.surfaceTint); expect(material.surfaceTintColor, colorScheme.surfaceTint);
expect(material.clipBehavior, Clip.antiAlias);
final Finder findDivider = find.byType(Divider); final Finder findDivider = find.byType(Divider);
final Container dividerContainer = tester.widget<Container>(find.descendant(of: findDivider, matching: find.byType(Container)).first); final Container dividerContainer = tester.widget<Container>(find.descendant(of: findDivider, matching: find.byType(Container)).first);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment