refactoring and checkpoint
This commit is contained in:
35
lib/presentation/widgets/quick_action_button.dart
Normal file
35
lib/presentation/widgets/quick_action_button.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class QuickActionButton extends StatelessWidget {
|
||||
final String label;
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
final double fontSize; // Ajout d'un paramètre pour personnaliser la taille du texte
|
||||
|
||||
const QuickActionButton({
|
||||
required this.label,
|
||||
required this.icon,
|
||||
required this.color,
|
||||
this.fontSize = 14, // Valeur par défaut
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 30,
|
||||
backgroundColor: color.withOpacity(0.2),
|
||||
child: Icon(icon, color: color, size: 28),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(color: Colors.white, fontSize: fontSize), // Utilisation de fontSize
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user