androidTile method

Widget androidTile(
  1. BuildContext context
)

Implementation

Widget androidTile(BuildContext context) {
  if (_tileType == _SettingsTileType.switchTile) {
    return SwitchListTile(
      secondary: leading,
      value: switchValue!,
      activeColor: switchActiveColor,
      onChanged: enabled ? onToggle : null,
      title: Text(
        title,
        style: titleTextStyle,
        maxLines: titleMaxLines,
        overflow: TextOverflow.ellipsis,
      ),
      subtitle: subtitle != null
          ? Text(
              subtitle!,
              style: subtitleTextStyle,
              maxLines: subtitleMaxLines,
              overflow: TextOverflow.ellipsis,
            )
          : null,
    );
  } else {
    return ListTile(
      title: Text(title, style: titleTextStyle),
      subtitle: subtitle != null
          ? Text(
              subtitle!,
              style: subtitleTextStyle,
              maxLines: subtitleMaxLines,
              overflow: TextOverflow.ellipsis,
            )
          : null,
      leading: leading,
      enabled: enabled,
      trailing: trailing,
      onTap: onTapFunction(context) as void Function()?,
    );
  }
}