2022-05-13 06:02:53 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2022-05-16 02:51:47 +02:00
|
|
|
import 'package:nekoya_flutter/utils/utils.dart';
|
2022-05-13 06:02:53 +02:00
|
|
|
|
|
|
|
class ColorDot extends StatelessWidget {
|
|
|
|
const ColorDot({
|
|
|
|
Key? key,
|
|
|
|
required this.color,
|
|
|
|
required this.isActive,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
final Color color;
|
|
|
|
final bool isActive;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
padding: const EdgeInsets.all(defaultPadding / 4),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(color: isActive ? primaryColor : Colors.transparent),
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
),
|
|
|
|
child: CircleAvatar(
|
|
|
|
radius: 10,
|
|
|
|
backgroundColor: color,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|