update y componente drawer

This commit is contained in:
Juan Felipe Duarte
2023-04-11 15:59:11 -05:00
parent 33d7da756f
commit 716ad80f1d
5 changed files with 314 additions and 457 deletions
+12 -6
View File
@@ -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),