decorationImage static method

DecorationImage decorationImage(
  1. String assetName,
  2. {BoxFit fit = BoxFit.cover,
  3. Alignment alignment = Alignment.center,
  4. ImageRepeat repeat = ImageRepeat.noRepeat}
)

Create a DecorationImage from local assetName

Implementation

static DecorationImage decorationImage(
  String assetName, {
  BoxFit fit = BoxFit.cover,
  Alignment alignment = Alignment.center,
  ImageRepeat repeat = ImageRepeat.noRepeat,
}) {
  return DecorationImage(
    image: AssetImage(assetName),
    alignment: alignment,
    repeat: repeat,
    fit: fit,
  );
}