svgFile function
Widget
svgFile(
- String imageUri, {
- Key? key,
- BoxFit? fit,
- Color? color,
- double? width,
- double? height,
- Alignment alignment = Alignment.center,
- BlendMode? colorBlendMode,
- bool excludeFromSemantics = false,
- bool matchTextDirection = false,
- bool allowDrawingOutsideViewBox = false,
- Widget? placeholder,
- bool cacheColorFilter = false,
- ColorFilter? colorFilter,
Create svg image widget
Implementation
Widget svgFile(
String imageUri, {
Key? key,
BoxFit? fit,
Color? color,
double? width,
double? height,
Alignment alignment = Alignment.center,
BlendMode? colorBlendMode,
bool excludeFromSemantics = false,
bool matchTextDirection = false,
bool allowDrawingOutsideViewBox = false,
Widget? placeholder,
bool cacheColorFilter = false,
ui.ColorFilter? colorFilter,
}) {
return SvgPicture.file(
File(imageUri),
key: key,
fit: fit ?? BoxFit.contain,
width: width,
height: height,
alignment: alignment,
excludeFromSemantics: excludeFromSemantics,
matchTextDirection: matchTextDirection,
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
placeholderBuilder:
placeholder != null ? (BuildContext context) => placeholder : null,
colorFilter: _getColorFilter(colorFilter, color, colorBlendMode),
);
}