在颤动中添加背景

时间:2020-08-13 08:15:28

标签: flutter dart

我正在尝试从窗口小部件添加背景,但无法正常工作:

home: Scaffold(
        appBar: CustomAppBar("Form"),
        body: Container(
          decoration: BoxDecoration(
              image: DecorationImage(
                  image: AssetImage("assets/img/bluetransparent.png", fit: BoxFit.cover)),
          child: Form(
            key: _formKey,
            child: SingleChildScrollView(
              child: Column(...............................

请帮助。 谢谢,

1 个答案:

答案 0 :(得分:2)

只需关闭括号即可解决问题:

image: AssetImage("assets/img/bluetransparent.png"), fit: BoxFit.cover)),