Flutter SDK Set Background image

后端 未结 10 1822
礼貌的吻别
礼貌的吻别 2020-11-30 20:38

I am trying to set a background image for the home page. I am getting the image place from start of the screen and filling the width but not the height. Am I missing someth

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 20:52

    decoration: BoxDecoration(
          image: DecorationImage(
            image: ExactAssetImage("images/background.png"),
            fit: BoxFit.cover
          ),
        ),
    

    this also works inside a container.

提交回复
热议问题