onTap property Null safety

(FutureOr<void> Function?()?) onTap
final

The onTap function is called when a user taps on CupertinoListTile. If left null, the CupertinoListTile will not react on taps. If this is a Future<void> Function(), then the CupertinoListTile remains activated until the returned future is awaited. This is according to iOS behaviour. However, if this function is a void Function(), then the tile is active only for the duration of invocation.

Implementation

final FutureOr<void> Function()? onTap;