mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-10 10:00:00 +00:00
27 lines
660 B
Dart
27 lines
660 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:selfprivacy/ui/atoms/chart_elements/colored_circle.dart';
|
|
|
|
class Legend extends StatelessWidget {
|
|
const Legend({
|
|
required this.color,
|
|
required this.text,
|
|
super.key,
|
|
});
|
|
|
|
final String text;
|
|
final Color color;
|
|
@override
|
|
Widget build(final BuildContext context) => Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
ColoredCircle(color: color),
|
|
const SizedBox(width: 4),
|
|
Text(
|
|
text,
|
|
style: Theme.of(context).textTheme.labelSmall,
|
|
),
|
|
],
|
|
);
|
|
}
|