mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-27 01:40:40 +00:00
9cfffc3377
* wip * hide `DynamicColorListTile` if unavailable * added color animation for `AnimatedDialog` * adjusted some colors * sync `AnimatedDialog` insets with material * scroll to selected color
28 lines
561 B
Dart
28 lines
561 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class FilledCircle extends StatelessWidget {
|
|
final double size;
|
|
final Color color;
|
|
final Widget? child;
|
|
|
|
const FilledCircle({
|
|
required this.size,
|
|
required this.color,
|
|
this.child,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ClipRRect(
|
|
borderRadius: BorderRadius.circular(size / 2),
|
|
child: SizedBox.fromSize(
|
|
size: Size.square(size),
|
|
child: ColoredBox(
|
|
color: color,
|
|
child: child,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|