2021-04-10 03:04:23 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:selfprivacy/config/brand_colors.dart';
|
|
|
|
|
2022-09-14 15:14:55 +00:00
|
|
|
// TODO: Delete this file.
|
|
|
|
|
2021-04-10 03:04:23 +00:00
|
|
|
class BrandRadio extends StatelessWidget {
|
2022-05-24 18:55:39 +00:00
|
|
|
const BrandRadio({
|
2021-04-10 03:04:23 +00:00
|
|
|
required this.isChecked,
|
2022-10-26 16:26:09 +00:00
|
|
|
super.key,
|
2022-06-05 19:36:32 +00:00
|
|
|
});
|
2021-04-10 03:04:23 +00:00
|
|
|
|
|
|
|
final bool isChecked;
|
|
|
|
|
|
|
|
@override
|
2022-06-05 19:36:32 +00:00
|
|
|
Widget build(final BuildContext context) => Container(
|
2022-06-05 22:40:34 +00:00
|
|
|
height: 20,
|
|
|
|
width: 20,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: const EdgeInsets.all(2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
border: _getBorder(),
|
|
|
|
),
|
|
|
|
child: isChecked
|
|
|
|
? Container(
|
|
|
|
height: 10,
|
|
|
|
width: 10,
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
color: BrandColors.primary,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: null,
|
|
|
|
);
|
2021-04-10 03:04:23 +00:00
|
|
|
|
2022-06-05 19:36:32 +00:00
|
|
|
BoxBorder? _getBorder() => Border.all(
|
2022-06-05 22:40:34 +00:00
|
|
|
color: isChecked ? BrandColors.primary : BrandColors.gray1,
|
|
|
|
width: 2,
|
|
|
|
);
|
2021-04-10 03:04:23 +00:00
|
|
|
}
|