dynamic_list_item 0.0.5 copy "dynamic_list_item: ^0.0.5" to clipboard
dynamic_list_item: ^0.0.5 copied to clipboard

A dynamic list item for who wants default platform styling within Flutter apps.

Dynamic List Item #

Flutter Analyze & Test

A dynamic list item for who wants default platform styling within Flutter apps.

Getting Started #

Simply start using the DynamicListItem widget in your lists. This can be done in a ListView but also Column.

The DynamicListItem widget has the following parameters:

  • @required title: Used for the primary label in the list item.
  • trailing: Trailing content within the list item. For example, an icon or a switch widget.
  • callback: Function which is called if the list item is pressed. Can also be read as an onTap.
  • position: Specified position within the given list (overall). This applies the right styling according to the platforms default (currently only iOS 15).

Examples #

Simple implementation

Column(
  children: <Widget>[
    DynamicListItem(title: "Title"),
  ];
)

Implementation with trailing and positional styling

Note: The positional styling is only applied on iOS as the time of writing.

ListView(
  padding: const EdgeInsets.all(8),
  children: <Widget>[
    DynamicListItem(
      title: "Item 1", 
      position: ListItemPostition.Top,
    ),
    DynamicListItem(
      title: "Item 2", 
      trailing: Icon(CupertinoIcons.paperplane_fill),
      position: ListItemPostition.Middle,
    ),
    DynamicListItem(
      title: "Item 3",
      trailing: Icon(CupertinoIcons.arrow_right),
      position: ListItemPostition.Bottom,
    ),
  ],
)
4
likes
120
pub points
44%
popularity

Publisher

verified publishersems.dev

A dynamic list item for who wants default platform styling within Flutter apps.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on dynamic_list_item