build method

  1. @override
dynamic build(
  1. dynamic context
)

Implementation

@override
Widget build(BuildContext context) {
  return Card(
    margin: EdgeInsets.zero,
    shape: RoundedRectangleBorder(
      side: BorderSide(
        color: Theme.of(context).colorScheme.onSurface,
      ),
      borderRadius: BorderRadius.circular(10),
    ),
    child: ListTile(
      key: spaceVisibilityValue != null
          ? generateKey(spaceVisibilityValue!)
          : null,
      leading: Icon(iconData),
      title: Text(
        title,
        style: Theme.of(context).textTheme.bodyMedium,
      ),
      subtitle: Text(
        subtitle,
        style: Theme.of(context).textTheme.labelMedium,
      ),
      onTap: isShowRadio && spaceVisibilityValue != null && onChanged != null
          ? () => onChange(spaceVisibilityValue, context)
          : null,
      trailing: isShowRadio && spaceVisibilityValue != null
          ? Radio<RoomVisibility>(
              value: spaceVisibilityValue!,
              groupValue: selectedVisibilityValue,
              onChanged: onChanged != null
                  ? (value) => onChange(value, context)
                  : null,
            )
          : const Icon(Icons.keyboard_arrow_down_sharp),
    ),
  );
}