Refactoring + Version améliorée
This commit is contained in:
31
lib/presentation/widgets/swipe_background.dart
Normal file
31
lib/presentation/widgets/swipe_background.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SwipeBackground extends StatelessWidget {
|
||||
final Color color;
|
||||
final IconData icon;
|
||||
final String label;
|
||||
|
||||
const SwipeBackground({
|
||||
Key? key,
|
||||
required this.color,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: color,
|
||||
alignment: Alignment.centerRight,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Icon(icon, color: Colors.white),
|
||||
const SizedBox(width: 10),
|
||||
Text(label, style: const TextStyle(color: Colors.white)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user