Image 如何在颤振中实现图像背景
我想有一个Image 如何在颤振中实现图像背景,image,flutter,background,Image,Flutter,Background,我想有一个背景图像,但不知道如何实现它,我写下了代码的第一部分,我认为这是解决问题所需要的 我需要Dart(颤振)中的解决方案。我用装饰盒尝试了一些东西,但没有成功,希望有人能帮助我 @override Widget build(BuildContext context) { return SafeArea( child: Scaffold( // appBar: AppBar(title: Text('App',style: TextStyle(fon
背景图像
,但不知道如何实现它,我写下了代码的第一部分,我认为这是解决问题所需要的
我需要Dart(颤振)中的解决方案。我用装饰盒尝试了一些东西,但没有成功,希望有人能帮助我
@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(),
),
);
}
试试这个:
@override
Widget build(BuildContext context){
return Scaffold(
body: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(''),
fit: BoxFit.cover,
),
),
child: Container(),
),
);
}