mascota en login,
This commit is contained in:
@@ -2,8 +2,9 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class VideoMascot extends StatelessWidget {
|
||||
final double size;
|
||||
final double zoom;
|
||||
|
||||
const VideoMascot({super.key, this.size = 108});
|
||||
const VideoMascot({super.key, this.size = 108, this.zoom = 5.5});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -16,15 +17,18 @@ class VideoMascot extends StatelessWidget {
|
||||
),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
// Cargamos el archivo como GIF
|
||||
child: Image.asset(
|
||||
'assets/animations/blink_saludo.gif',
|
||||
fit: BoxFit.cover,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
// Plan B: si el archivo no existe o hay error, mostramos la huellita
|
||||
return const Center(
|
||||
child: Icon(Icons.pets, color: Colors.white, size: 48),
|
||||
);
|
||||
},
|
||||
child: Transform.scale(
|
||||
scale: zoom,
|
||||
child: Image.asset(
|
||||
'assets/animations/blink_saludo.gif',
|
||||
fit: BoxFit.cover,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
// Plan B: si el archivo no existe o hay error, mostramos la huellita
|
||||
return const Center(
|
||||
child: Icon(Icons.pets, color: Colors.white, size: 48),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user