32 lines
756 B
Dart
32 lines
756 B
Dart
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)),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|