Gestión de usuarios y avatares en la aplicación. Gestión de traducciones de las palabras.
This commit is contained in:
@@ -269,12 +269,14 @@ class TarjetaPalabraFarolero extends StatelessWidget {
|
||||
|
||||
class AvatarFarolero extends StatelessWidget {
|
||||
final String texto;
|
||||
final String? assetPath;
|
||||
final Color color;
|
||||
final double size;
|
||||
|
||||
const AvatarFarolero({
|
||||
super.key,
|
||||
required this.texto,
|
||||
this.assetPath,
|
||||
this.color = TemaApp.colorNaranja,
|
||||
this.size = 40,
|
||||
});
|
||||
@@ -292,15 +294,24 @@ class AvatarFarolero extends StatelessWidget {
|
||||
border: Border.all(color: TemaApp.colorDorado, width: 2),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
texto,
|
||||
style: TextStyle(
|
||||
color: TemaApp.colorTexto,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: size * 0.36,
|
||||
child: assetPath == null
|
||||
? Text(
|
||||
texto,
|
||||
style: TextStyle(
|
||||
color: TemaApp.colorTexto,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: size * 0.36,
|
||||
),
|
||||
)
|
||||
: ClipOval(
|
||||
child: Image.asset(
|
||||
assetPath!,
|
||||
width: size,
|
||||
height: size,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user