📜  将 bg 图像添加到脚手架颤振 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:02.594000             🧑  作者: Mango

代码示例1
@override
Widget build(BuildContext context) {
  return new Scaffold(
    body: new Stack(
      children: [
        new Container(
          decoration: new BoxDecoration(
            image: new DecorationImage(image: new AssetImage("images/background.jpg"), fit: BoxFit.cover,),
          ),
        ),
        new Center(
          child: new Text("Hello background"),
        )
      ],
    )
  );
}