forked from eatvio/eatvio_app
feat(diary) Addeed mood and satiety picker scale to the screen
This commit is contained in:
28
lib/widgets/custom_scale_element.dart
Normal file
28
lib/widgets/custom_scale_element.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
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,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user