createMaterialWidget method
Implementation
@override
Widget createMaterialWidget(BuildContext context) {
final data = material?.call(context, platform(context));
assert(data?.child != null || child != null);
final icon = data?.icon;
if (icon != null) {
return TextButton.icon(
key: data?.widgetKey ?? widgetKey,
label: data?.child ?? child!,
icon: icon,
onPressed: data?.onPressed ?? onPressed,
onLongPress: data?.onLongPress,
autofocus: data?.autofocus ?? false,
clipBehavior: data?.clipBehavior ?? Clip.none,
focusNode: data?.focusNode,
style: data?.style,
onHover: data?.onHover,
onFocusChange: data?.onFocusChange,
);
}
return TextButton(
key: data?.widgetKey ?? widgetKey,
child: data?.child ?? child!,
onPressed: data?.onPressed ?? onPressed,
onLongPress: data?.onLongPress,
autofocus: data?.autofocus ?? false,
clipBehavior: data?.clipBehavior ?? Clip.none,
focusNode: data?.focusNode,
style: data?.style,
onFocusChange: data?.onFocusChange,
onHover: data?.onHover,
statesController: data?.statesController,
);
}