createMaterialWidget method
Implementation
@override
SearchBar createMaterialWidget(BuildContext context) {
final data = material?.call(context, platform(context));
final backgroundColor = this.backgroundColor;
final hintStyle = this.hintStyle;
final textStyle = this.textStyle;
return SearchBar(
//Common
key: data?.widgetKey ?? widgetKey,
controller: data?.controller ?? controller,
focusNode: data?.focusNode ?? focusNode,
onTap: data?.onTap ?? onTap,
onChanged: data?.onChanged ?? onChanged,
backgroundColor: data?.backgroundColor ??
(backgroundColor != null
? MaterialStateProperty.all<Color>(backgroundColor)
: null),
hintText: data?.hintText ?? hintText,
hintStyle: data?.hintStyle ??
(hintStyle != null
? MaterialStateProperty.all<TextStyle>(hintStyle)
: null),
textStyle: data?.textStyle ??
(textStyle != null
? MaterialStateProperty.all<TextStyle>(textStyle)
: null),
//Material only
leading: data?.leading,
trailing: data?.trailing,
constraints: data?.constraints,
elevation: data?.elevation,
shadowColor: data?.shadowColor,
surfaceTintColor: data?.surfaceTintColor,
overlayColor: data?.overlayColor,
side: data?.side,
shape: data?.shape,
padding: data?.padding,
onSubmitted: data?.onSubmitted,
textCapitalization: data?.textCapitalization,
);
}