onTap property

(FutureOr<void> Function()?) onTap

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 behavior. However, if this function is a void Function(), then the tile is active only for the duration of invocation.


final FutureOr<void> Function()? onTap;