CPListTemplate class
A template object that displays and manages a list of items.
- Implemented types
Constructors
-
CPListTemplate({String? title, required List<
CPListSection> sections, List<String> ? emptyViewTitleVariants, List<String> ? emptyViewSubtitleVariants, bool showsTabBadge = false, required String systemIcon, CPBarButton? backButton, bool sectionIndexEnabled = true}) - Creates CPListTemplate to display a list of items, grouped into one or more sections. Each section contains an array of list items — objects that is CPListItem
Properties
- backButton → CPBarButton?
-
Back button object
final
-
emptyViewSubtitleVariants
→ List<
String> ? -
An optional array of subtitle variants for the template’s empty view.
Provide the strings as localized displayable content and order from most- to
least- preferred. When there are no items in the list, the template displays
an empty view with a title and a subtitle in place of the items. If you update
the list and provide items, the template automatically removes the empty view.
final
-
emptyViewTitleVariants
→ List<
String> ? -
An optional array of title variants for the template’s empty view.
Provide the strings as localized displayable content and order from most- to
least- preferred. When there are no items in the list, the template displays
an empty view with a title and a subtitle in place of the items. If you update
the list and provide items, the template automatically removes the empty view.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sectionIndexEnabled → bool
-
Whether to show the section index (alphabetical letters) in the scroll bar.
When true, the first letter of each section header appears on the right edge
for quick navigation. Section headers are always shown regardless of this setting.
Defaults to true.
final
-
sections
→ List<
CPListSection> -
An array of list sections as CPListSection, each can contain zero or more list items.
final
- showsTabBadge → bool
-
An indicator you use to call attention to the tab. When it is true, a small
red indicator will be displayed on the tab in order to show user that it requires
an action or you received an notification e.g.
final
- systemIcon → String
-
A system icon which will be used in a image that represents the content of the tab.
final
- title → String?
-
A title displayed in the navigation bar.
It will be displayed when only the list template is visible.
final
- uniqueId → String
-
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateSections(
List< CPListSection> newSections) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited