getAssetSizeImage static method

Image getAssetSizeImage(
  1. String assetFilePath,
  2. double w,
  3. double h, {
  4. Color? color,
  5. String? package,
})

Implementation

static Image getAssetSizeImage(String assetFilePath, double w, double h,
    {Color? color, String? package}) {
  if (!assetFilePath.startsWith('assets')) {
    assetFilePath = 'assets/$assetFilePath';
  }
  return Image.asset(
    assetFilePath,
    package: package ?? BaseStrings.flutterPackageName,
//      scale: 3.0,
    width: w,
    height: h,
    color: color,
  );
}