body: SingleChildScrollView(
child: InkWell(
splashColor: Colors.black87,
onTap: () {},
child: Ink.image(
image: Image.asset('images/logo.png'), // here
height: 100,
width: 400,
fit: BoxFit.cover,
),
),
),
I want to apply asset image on my text button
CodePudding user response:
You can use AssetImage
image:AssetImage('images/logo.png'),
CodePudding user response:
it wants image with ImageProvider type and you can change it with this
body: SingleChildScrollView(
child: InkWell(
splashColor: Colors.black87,
onTap: () {},
child: Ink.image(
image: AssetImage("images/logo.png"),
height: 100,
width: 400,
fit: BoxFit.cover,
),
),
),