I have import Image in My Flutter Project How to set Background Image on the Mobile Screen in the Flutter Framework.
- 5 years ago
If you want the image to fill the entire screen you can use a DecorationImage
with a fit of BoxFit.cover
.
class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context){
return new Scaffold(
body: new Container(
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage("assets/google.jpg"),
fit: BoxFit.cover,
),
),
child: null,
),
);
}
}
- 4 years ago
Center( child:Text("hello world",textDirection: TextDirection.ltr), ) );
Goal Ploy - Money Management App