buildIcon method
Widget
buildIcon(
- BuildContext context, {
- required double size,
- required Color color,
- String? semanticLabel,
override
Loads the SVG from the carpenter package at the requested logical-pixel width and height. Applies color with a source-in filter and forwards semanticLabel to the SVG renderer.
Implementation
@override
Widget buildIcon(
BuildContext context, {
required double size,
required Color color,
String? semanticLabel,
}) {
return SvgPicture.asset(
assetPath,
package: 'carpenter',
width: size,
height: size,
colorFilter: ColorFilter.mode(color, BlendMode.srcIn),
semanticsLabel: semanticLabel,
);
}