svgFromCommon static method

Widget svgFromCommon({
  1. required String assetName,
  2. String? packageName,
  3. double? width,
  4. double? height,
  5. BoxFit fit = BoxFit.contain,
  6. Color? color,
})

Implementation

static Widget svgFromCommon(
    {required String assetName,
    String? packageName,
    double? width,
    double? height,
    BoxFit fit = BoxFit.contain,
    Color? color}) {
  return SvgPicture.asset(
    GtdString.pathForAsset(packageName, assetName),
    width: width,
    height: height,
    fit: fit,
    colorFilter: color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null,
  );
}