wrap method
Returns a copy of ButtonTheme with the specified child
.
Implementation
@override
Widget wrap(
BuildContext context,
Widget child,
) {
final ButtonTheme? buttonTheme =
context.findAncestorWidgetOfExactType<ButtonTheme>();
return identical(this, buttonTheme)
? child
: ButtonTheme(data: data, child: child);
}