38 lines
1.1 KiB
Dart
38 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// 사본 `Radio` 컴포넌트(20) — 미선택은 #2A2A2C 가는 테두리, 선택은 #D1D1D2 원 안의 어두운 점.
|
|
///
|
|
/// Material [Radio] 는 2px 링을 그려 사본보다 굵고 밝다. 신고 사유 · 환불 사유가 같이 쓴다.
|
|
class AppRadio extends StatelessWidget {
|
|
const AppRadio({super.key, required this.selected});
|
|
|
|
final bool selected;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => Semantics(
|
|
checked: selected,
|
|
inMutuallyExclusiveGroup: true,
|
|
child: Container(
|
|
width: 20,
|
|
height: 20,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: selected ? const Color(0xFFD1D1D2) : null,
|
|
border: selected
|
|
? null
|
|
: Border.all(color: const Color(0xFF2A2A2C), width: 1.5),
|
|
),
|
|
child: selected
|
|
? const DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: Color(0xFF141414),
|
|
),
|
|
child: SizedBox.square(dimension: 8),
|
|
)
|
|
: null,
|
|
),
|
|
);
|
|
}
|