fromAsset static method

Widget fromAsset(
  1. String asset, {
  2. double radius = 0.0,
  3. double? height,
  4. double? width,
  5. BoxFit? fit,
  6. dynamic scale = 1.0,
})

Implementation

static Widget fromAsset(
  String asset, {
  double radius: 0.0,
  double? height,
  double? width,
  BoxFit? fit,
  scale: 1.0,
}) {
  var widget = Image.asset(
    asset,
    scale: scale,
    fit: fit,
    width: width,
    height: height,
  );

  return _setItInContainer(_addRadius(widget, radius, width, height), width, height);
}