Cupertinolisttile
Examples#
Notched and non-notched list tiles#
import flet as ft
def main(page: ft.Page):
def handle_tile_click(e: ft.Event[ft.CupertinoListTile]):
print("Tile clicked")
page.add(
ft.CupertinoListTile(
additional_info=ft.Text("Wed Jan 24"),
bgcolor_activated=ft.Colors.AMBER_ACCENT,
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
title=ft.Text("CupertinoListTile: notched = False"),
subtitle=ft.Text("Subtitle"),
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
on_click=handle_tile_click,
),
ft.CupertinoListTile(
notched=True,
additional_info=ft.Text("Thu Jan 25"),
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
title=ft.Text("CupertinoListTile: notched = True"),
subtitle=ft.Text("Subtitle"),
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
on_click=handle_tile_click,
),
)
ft.run(main)
CupertinoListTile
#
Bases: LayoutControl
An iOS-style list tile.
Can also serve as a cupertino equivalent of the Material ListTile.
| RAISES | DESCRIPTION |
|---|---|
AssertionError
|
If |
additional_info
#
additional_info: StrOrControl | None = None
A Control to display on the right of the list tile, before trailing.
Similar to subtitle, an additional_info
is used to display additional information.
Typically a Text control.
bgcolor_activated
#
bgcolor_activated: ColorValue | None = None
The background color of this list tile after it was tapped.
notched
#
notched: bool = False
Whether this list tile should be created in an "Inset Grouped" form, known from either iOS Notes or Reminders app.
on_click
#
on_click: ControlEventHandler[CupertinoListTile] | None = (
None
)
Called when a user clicks/taps the list tile.
padding
#
padding: PaddingValue | None = None
The tile's internal padding. Insets a CupertinoListTile's contents:
its leading, title, subtitle,
additional_info and trailing controls.
subtitle
#
subtitle: StrOrControl | None = None
trailing
#
trailing: IconDataOrControl | None = None
