resolveInputDecorationStateProperty function
InputDecoration?
resolveInputDecorationStateProperty({
- required PaginatedSearchBarStyleStateProperty<
InputDecoration> ? inputDecorationState, - required InputDecoration? inputDecoration,
- required Set<
PaginatedSearchBarState> states, - required String? hintText,
Implementation
InputDecoration? resolveInputDecorationStateProperty({
required PaginatedSearchBarStyleStateProperty<InputDecoration>?
inputDecorationState,
required InputDecoration? inputDecoration,
required Set<PaginatedSearchBarState> states,
required String? hintText,
}) {
if (inputDecorationState != null) {
return inputDecorationState.resolve(states);
}
if (inputDecoration != null) {
return inputDecoration;
}
return InputDecoration(
hintText: hintText,
hintStyle: const TextStyle(fontSize: 18, color: Colors.grey),
prefixIcon: const Icon(
Icons.search,
size: 26,
color: Colors.grey,
),
suffix: states.contains(PaginatedSearchBarState.searching)
? const SizedBox(
height: 18,
width: 18,
child: CircularProgressIndicator(
strokeWidth: 2,
),
)
: null,
border: const OutlineInputBorder(
borderSide: BorderSide.none,
),
);
}