I'm using this below code to show avatar image from firebase. If image data from firebase is null the app will be error. My question is how to put default image like person.jpg from my asset folder to this code?
Stack(
children: [
CircleAvatar(
backgroundColor: kDarkGreenColor.withOpacity(0.5),
radius: 60.0,
backgroundImage:
NetworkImage(snapshot.data.data()['userimage']),
),
Positioned(
top: 90.0,
left: 90.0,
child: Icon(FontAwesomeIcons.plusCircle,
color: kWhiteColor))
],
),