Managing exception in dart
问题 I'm trying to fetch an image from the internet, and display a profile photo. If there is an error while displaying the pic (maybe it doesnt exist at that location), I want to display a stock icon. My code: class AvatarWidget extends StatelessWidget { const AvatarWidget({ Key key, }) : super(key: key); @override Widget build(BuildContext context) { return ClipOval( child: CircleAvatar( child: ProfilePicWidget(), radius: 70, backgroundColor: Colors.grey, ), ); } } class ProfilePicWidget extends