如何解决如何在抖动中实现图像背景
我想拥有一个background Image
,但是不知道如何实现,我写下了我认为需要解决我的问题的代码的第一部分。
我需要Dart(Flutter)中的解决方案。我用DecoratedBox
尝试了一些方法,但是没有用,希望有人可以帮助我。
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
// appBar: AppBar(title: Text('App',style: TextStyle(fontWeight: FontWeight.w900),),backgroundColor: Colors.brown[500],body: Center(
child: Padding(
解决方法
尝试一下:
@override
Widget build(BuildContext context){
return Scaffold(
body: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(''),fit: BoxFit.cover,),child: Container(),);
}