Carbon Flutter
  • Overview ⚡️
  • Installation ⚙️
  • Widgets 🧩
    • Breadcrumb
    • Button
    • Checkbox
    • Form
    • Icons
    • Link
    • Notification
    • OverflowMenu
    • Text
    • TextField
    • Toggle
Powered by GitBook
On this page
  • Widget API
  • Example

Was this helpful?

  1. Widgets 🧩

Breadcrumb

PreviousInstallation ⚙️NextButton

Last updated 2 years ago

Was this helpful?

The breadcrumb is a secondary navigation pattern that helps a user understand the hierarchy among levels and navigate back through them.

Widget API

Property
Description

children

A list of CBreadcrumbItem to display in a row.

  • Type: List<CBreadcrumbItem>

  • Default: required

noTrailingSlash

Whether to omit the trailing slash for the breadcrumbs or not.

  • Type: bool

  • Default: true

breadcrumbsLimit

To truncate the breadcrumbs when children length exceeds breadcrumbsLimit.

  • Type: int

  • Default: 3

Property
Description

child

The content of the breadcrumb item.

  • Type: Widget

  • Default: required

onTap

Called when the item is tapped.

  • Type: VoidCallback

  • Default: required

isCurrentPage

Whether this breadcrumb item represents the current page or not.

  • Type: Widget

  • Default: true

Example

CBreadcrumb(
    breadcrumbsLimit: 4,
    noTrailingSlash: false,
    children: [
      CBreadcrumbItem(child: CText(data: 'one'), onTap: () {}),
      CBreadcrumbItem(child: CText(data: 'two'), onTap: () {}),
      CBreadcrumbItem(child: CText(data: 'three'), onTap: () {}),
      CBreadcrumbItem(
        child: CText(data: 'four'),
        isCurrentPage: true,
        onTap: () {},
      ),
      CBreadcrumbItem(child: CText(data: 'five'), onTap: () {}),
    ],
  );