getAssetScaleImage static method

Image getAssetScaleImage(
  1. String assetFilePath, {
  2. String? package,
})

Implementation

static Image getAssetScaleImage(String assetFilePath, {String? package}) {
  if (!assetFilePath.startsWith('assets')) {
    assetFilePath = 'assets/$assetFilePath';
  }
  return Image.asset(
    assetFilePath,
    package: package ?? BaseStrings.flutterPackageName,
  );
}