Add padding options to SearchAnchor (#152508)

Cherry-picked padding changes from https://github.com/flutter/flutter/pull/148856

Adds padding configuration options to `SearchAnchor`. This PR adds the following:
- `viewBarPadding`: The padding for items inside the `SearchBar` in the `SearchAnchor` view
- `viewPadding`: The padding to use around the entire `SearchAnchor` view

Working towards https://github.com/flutter/flutter/issues/148852
This commit is contained in:
Rexios
2024-10-15 16:24:48 -04:00
committed by GitHub
parent 2dad95b21c
commit e96aaab5e0
5 changed files with 202 additions and 51 deletions

View File

@@ -47,6 +47,9 @@ class _${blockName}DefaultsM3 extends ${blockName}ThemeData {
@override
BoxConstraints get constraints => const BoxConstraints(minWidth: 360.0, minHeight: 240.0);
@override
EdgeInsetsGeometry? get barPadding => const EdgeInsets.symmetric(horizontal: 8.0);
@override
Color? get dividerColor => ${componentColor('md.comp.search-view.divider')};
}