buildTileContent method

Widget buildTileContent(
  1. BuildContext context
)

Implementation

Widget buildTileContent(BuildContext context) {
  // You need to wrap Ink widgets with Material to clip it properly.
  return Material(
    color: Theme.of(context).brightness == Brightness.light
        ? Theme.of(context).colorScheme.surfaceContainerLow
        : Theme.of(context).colorScheme.surfaceContainerHigh,
    child: InkWell(
      onTap: (enabled)
          ? () {
              if (onPressed != null) {
                onPressed!.call(context);
              }
              if (onToggle != null) {
                onToggle!.call(null);
              }
              if (onChanged != null) {
                onChanged!.call(radioValue);
              }
            }
          : () {},
      mouseCursor: SystemMouseCursors.click,
      child: Container(
        constraints: BoxConstraints(minHeight: 65),
        child: Row(
          children: [
            if (leading != null) buildLeading(context),
            Expanded(
              child: Column(
                mainAxisSize: MainAxisSize.min,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Row(
                    children: [
                      Expanded(child: buildTitle(context)),
                      buildTrailing(context),
                    ],
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    ),
  );
}