I am trying to store only the URL from the specific document from firebase because I want to use it for my background image. I tried a couple of tutorials from youtube, but most of the tutorials do not teach how to do it. I am new to flutter and programming.
I want to store the URL because I am trying to make a login page that can upload the profile picture. the code below is the widget I am trying to make.
Widget imageProfile() {
return Center(
child: Stack(
children: <Widget>[
CircleAvatar(
radius: 80.0,
backgroundImage: _photo == null
? const AssetImage('assets/images/user1.png') as ImageProvider
: FileImage(File(_photo!.path))),
// backgroundImage:
Positioned(
bottom: 20.0,
right: 20.0,
child: InkWell(
onTap: () {
showModalBottomSheet(
context: this.context,
builder: ((builder) => bottomSheet()),
);
},
child: const Icon(
Icons.camera_alt,
color: Colors.white,
size: 28.0,
),
),
),
],
),
);
}