radioBox method
Implementation
Widget radioBox(HubbleThemeData theme, HubbleRadioStyle style) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: theme.size.s12, vertical: theme.size.s16),
decoration: BoxDecoration(
color: style.boxBackground,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
HubbleRadioButton(isSelected: isSelected),
theme.width8,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
HubbleText(child.title, style: style.titleStyle),
AnimatedOpacity(
curve: Curves.easeInExpo,
duration: const Duration(milliseconds: 400),
opacity: isSelected ? 1 : 0,
child: AnimatedSize(
duration: const Duration(milliseconds: 200),
child: isSelected
? Column(
children: [
theme.height4,
HubbleText(child.subtitle,
style: style.subtitleStyle),
],
)
: const SizedBox.shrink(),
),
),
],
).expanded()
],
),
);
}