Files
eatvio_app/lib/widgets/custom_scale_element.dart

29 lines
595 B
Dart

import 'package:flutter/material.dart';
class ScaleElement extends StatelessWidget {
final Color color;
final bool isSelected;
final VoidCallback onTap;
const ScaleElement({
required this.color,
required this.isSelected,
required this.onTap,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
width: isSelected ? 40 : 20,
height: isSelected ? 40 : 20,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
),
),
);
}
}