build method
构建自定义图标按钮组件
Builds the custom icon button widget.
Implementation
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onPressed,
behavior: HitTestBehavior.opaque,
child: Container(
width: iconSize.width,
height: iconSize.height,
margin: margin,
alignment: Alignment.center,
child: Image.asset(
PlayerAssetsScope.iconPath(context, iconName),
fit: BoxFit.cover,
),
),
);
}