Sidebar

Example

import 'package:flutter_vant_kit/main.dart';

List<SideBarItem> list = [
  SideBarItem(
    title: "Title"
  ),
  SideBarItem(
    title: "Title"
  ),
  ...
];

Sidebar(
  list: list,
  ...
)

More examples please refer Demo

API

AttributeDescriptionTypeDefault

active

Current option

int

0

list

All options

List<SideBarItem>

-

onChange

Triggered when the current option changes

Function(int val)

-

SideBarItem

AttributeDescriptionTypeDefault

title

Content

String

-

dot

Whether to show red dot

bool

false

info

Content of the badge

String

-

disabled

Whether to be disabled

bool

false

onClick

Triggered when click on the option

Function(int val)

-

children

Sub-option content

List

-

content

Custom sub-option content

Widget

-

Last updated