update y componente drawer
This commit is contained in:
@@ -8,7 +8,12 @@ const double photoSize = 100;
|
||||
class ReferencePhoto extends StatelessWidget {
|
||||
Reference? ref;
|
||||
double size;
|
||||
ReferencePhoto({super.key, required this.ref, this.size = photoSize});
|
||||
double sizeCircle;
|
||||
ReferencePhoto(
|
||||
{super.key,
|
||||
required this.ref,
|
||||
this.size = photoSize,
|
||||
this.sizeCircle = photoSize});
|
||||
|
||||
Future<Widget> downloadImage() async {
|
||||
try {
|
||||
@@ -28,7 +33,7 @@ class ReferencePhoto extends StatelessWidget {
|
||||
// ignore: empty_catches
|
||||
} catch (e) {}
|
||||
|
||||
return const DefaultPhoto();
|
||||
return DefaultPhoto(sizeDefault: sizeCircle);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -48,20 +53,21 @@ class ReferencePhoto extends StatelessWidget {
|
||||
snapshot.hasData) {
|
||||
return snapshot.data!;
|
||||
} else {
|
||||
return const DefaultPhoto();
|
||||
return DefaultPhoto();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class DefaultPhoto extends StatelessWidget {
|
||||
const DefaultPhoto({super.key});
|
||||
double sizeDefault;
|
||||
DefaultPhoto({super.key, this.sizeDefault = photoSize});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: photoSize,
|
||||
height: photoSize,
|
||||
width: sizeDefault,
|
||||
height: sizeDefault,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF2BA4EC),
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
|
||||
Reference in New Issue
Block a user