resolveContainerStyleStateProperty function
BoxDecoration?
resolveContainerStyleStateProperty({
- required PaginatedSearchBarStyleStateProperty<
BoxDecoration> ? containerDecorationState, - required BoxDecoration? containerDecoration,
- required Set<
PaginatedSearchBarState> states,
Implementation
BoxDecoration? resolveContainerStyleStateProperty({
required PaginatedSearchBarStyleStateProperty<BoxDecoration>?
containerDecorationState,
required BoxDecoration? containerDecoration,
required Set<PaginatedSearchBarState> states,
}) {
if (containerDecorationState != null) {
return containerDecorationState.resolve(states);
}
if (containerDecoration != null) {
return containerDecoration;
}
return BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular((8))),
boxShadow: states.contains(PaginatedSearchBarState.focused)
? [
BoxShadow(
color: Colors.black12.withOpacity(0.2),
spreadRadius: 2,
blurRadius: 6,
offset: const Offset(0, 1),
),
]
: [
BoxShadow(
color: Colors.black12.withOpacity(0.1),
spreadRadius: 2,
blurRadius: 2,
offset: const Offset(0, 1),
),
],
);
}