Spaces:
Configuration error
Configuration error
File size: 1,005 Bytes
78013c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | import 'package:flutter/material.dart';
import 'package:smart_attendance_app/app/theme.dart';
/// Chart legend indicator — replaces duplicate _LegendDot in analytics and history.
class LegendDot extends StatelessWidget {
final Color color;
final String label;
final bool isCircle;
const LegendDot({
super.key,
required this.color,
required this.label,
this.isCircle = true,
});
@override
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 10,
height: 10,
decoration: BoxDecoration(
color: color,
shape: isCircle ? BoxShape.circle : BoxShape.rectangle,
borderRadius: isCircle ? null : BorderRadius.circular(2),
),
),
const SizedBox(width: SasSpacing.xs),
Text(
label,
style: const TextStyle(color: SasColors.textMuted, fontSize: 10),
),
],
);
}
}
|