Android 如何设置脚手架容器的全屏背景图像

Android 如何设置脚手架容器的全屏背景图像,android,ios,flutter,flutter-layout,flutter-dependencies,Android,Ios,Flutter,Flutter Layout,Flutter Dependencies,我想设置脚手架容器的全屏背景图像,但不知道如何设置?这是我的密码: @override Widget build(BuildContext context) { _deviceHeight = MediaQuery.of(context).size.height; _deviceWidth = MediaQuery.of(context).size.width; return Scaffold( backgroundColor: Theme.of(cont

我想设置脚手架容器的全屏背景图像,但不知道如何设置?这是我的密码:

@override
  Widget build(BuildContext context) {
    _deviceHeight = MediaQuery.of(context).size.height;
    _deviceWidth = MediaQuery.of(context).size.width;
    return Scaffold(
      backgroundColor: Theme.of(context).hintColor,
      appBar: AppBar(
        backgroundColor: Theme.of(context).accentColor,
        title: Text(this.widget._receiverName),
      ),
      body: ChangeNotifierProvider<AuthProvider>.value(
        value: AuthProvider.instance,
        child: _conversationPageUI(),
      )
    );
      }
@覆盖
小部件构建(构建上下文){
_deviceHeight=MediaQuery.of(context).size.height;
_deviceWidth=MediaQuery.of(context).size.width;
返回脚手架(
背景色:主题。背景色,
appBar:appBar(
背景色:主题。背景色,
标题:文本(此.widget.\u接收方名称),
),
正文:ChangeNotifierProvider.value(
值:AuthProvider.instance,
子项:_conversationPageUI(),
)
);
}

用容器包裹脚手架,并设置装饰

 Container(
      decoration: BoxDecoration(image: DecorationImage(image: AssetImage("... your image"))),
      child: Scaffold(),
    );

不要忘记将脚手架背景设置为颜色。透明的

用容器包裹脚手架并设置其装饰

 Container(
      decoration: BoxDecoration(image: DecorationImage(image: AssetImage("... your image"))),
      child: Scaffold(),
    );
别忘了将scaffold background设置为Colors.transparent