//I am trying to do this
String? userAvaterUrl = null;
//so I can do this:
FutureBuilder(
future: getPicture(),
builder: (context, snapshot) {
if (snapshot.hasData || snapshot.data != null) {
return CircleAvatar(
radius: width * 0.18,
backgroundImage:
NetworkImage(snapshot.data.toString()),
);
} else {
return CircleAvatar(
radius: width * 0.18,
backgroundImage: AssetImage(
"assets/images/icons2.png"));
}
},
),