Answers for "how to import background in flutter"

4

flutter background image

Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Container(
        decoration: BoxDecoration(
            image: DecorationImage(
                image: AssetImage("images/logo.png"), fit: BoxFit.cover)),
        child: Scaffold(),),);
Posted by: Guest on June-12-2021
1

add bg image flutter

//This should be inside Container widget
			decoration: BoxDecoration(
            image: DecorationImage(
                image: AssetImage('assets/image.jpeg'), fit: BoxFit.cover),
          ),
Posted by: Guest on September-20-2021

Code answers related to "how to import background in flutter"

Browse Popular Code Answers by Language