Show image in Flutter
Load image from Asset
Image.asset("assets/images/blogcover.jpeg",
height: 150, width: 150, fit: BoxFit.cover)
Crashed?????
Yes you have to add an image on
pubspec.yaml file for more detail visit: https://flutter.dev/docs/development/ui/assets-and-images
Load image from URL
Image.network('http://www......png',height: 150,width: 150,fit: BoxFit.cover),
To set image round we have multiple options
CircleAvatar with border
CircleAvatar(radius: 55, //for borderbackgroundColor: Colors.red, //for border widthchild: CircleAvatar(radius: 50,backgroundImage: AssetImage("assets/images/blogcover.jpeg"),),),
Container with BoxDecoration
Container(width: 150,height: 150,decoration: BoxDecoration(shape: BoxShape.circle,border: Border.all(color: Colors.black, width: 2),image: DecorationImage(image: AssetImage("assets/images/blogcover.jpeg"),fit: BoxFit.fill),),)