CircleAvatar( backgroundImage: snapshot.data['imageUrl']=="" ? AssetImage('assets/img.png'):NetworkImage(snapshot.data['imageUrl']), )
CodePudding user response:
this is currently an open issue on GitHub with dart 2.12.
As a workaround you can cast the object
AssetImage('assets/img.png') as ImageProvider,