How can i use Svg picture asset as leading property in List tile flutter?

Viewed 30

How can i use Svg picture asset as leading property in List tile flutter? The code blew gives me an error:

ListTile(
      leading: Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(10),
          color: Colors.purple
        ),
          child: SvgPictures.assset(Images.svgBulb)),
      title: Text('Management',style: TextStyle(fontSize: 14,fontWeight: FontWeight.bold,color: Colors.black),),
      subtitle: Text('2 Courses',style: TextStyle(fontSize: 12,fontWeight: FontWeight.bold,color: Colors.grey),),
    )
1 Answers

You use the wrong name, change this:

child: SvgPictures.assset(Images.svgBulb)),

to :

child: SvgPicture.asset(Images.svgBulb)),
Related