CupertinoListTile.notched constructor
- Key? key,
- required Widget title,
- Widget? subtitle,
- Widget? additionalInfo,
- Widget? leading,
- Widget? trailing,
- FutureOr<
void> onTap()?, - Color? backgroundColor,
- Color? backgroundColorActivated,
- EdgeInsetsGeometry? padding,
- double leadingSize = _kNotchedLeadingSize,
- double leadingToTitle = _kNotchedLeadingToTitle,
Creates a notched iOS-style list tile like the tiles in iOS Notes app or Reminders app.
The title parameter is required. It is used to convey the most important
information of list tile. It is typically a Text.
The subtitle parameter is used to display additional information. It is
placed below the title.
The additionalInfo parameter is used to display additional information.
It is placed at the end of the tile, before the trailing if supplied.
The leading parameter is typically an Icon or an Image and it comes
at the start of the tile. If omitted in all list tiles, a hasLeading of
enclosing CupertinoListSection should be set to false to ensure
correct margin of divider between tiles. For Notes-like tile appearance,
the leading can be left null.
The trailing parameter is typically a CupertinoListTileChevron, an
Icon, or a CupertinoButton. It is placed at the very end of the tile.
For Notes-like tile appearance, the trailing can be left null.
The onTap parameter is used to provide an action that is called when the
tile is tapped. It is mainly used for navigating to a new route. It should
not be used to toggle a trailing CupertinoSwitch and similar use cases
because when tile is tapped, it switches the background color and remains
changed. This is according to iOS behavior.
The backgroundColor provides a custom background color for the tile in
a state before tapped. By default, it matches the theme's background color
which is by default a CupertinoColors.systemBackground.
The backgroundColorActivated provides a custom background color for the
tile after it was tapped. By default, it matches the theme's background
color which is by default a CupertinoColors.systemGrey4.
The padding parameter sets the padding of the content inside the tile.
It defaults to a value that matches the iOS look, depending on a type of
CupertinoListTile. For native look, it should not be provided.
The leadingSize constrains the width and height of the leading widget.
By default, it is set to a value that matches the iOS look, depending on a
type of CupertinoListTile. For native look, it should not be provided.
The leadingToTitle specifies the horizontal space between leading and
title widgets. By default, it is set to a value that matched the iOS
look, depending on a type of CupertinoListTile. For native look, it
should not be provided.
Implementation
const CupertinoListTile.notched({
super.key,
required this.title,
this.subtitle,
this.additionalInfo,
this.leading,
this.trailing,
this.onTap,
this.backgroundColor,
this.backgroundColorActivated,
this.padding,
this.leadingSize = _kNotchedLeadingSize,
this.leadingToTitle = _kNotchedLeadingToTitle,
}) : _type = _CupertinoListTileType.notched;