cascade_picker 0.0.3 copy "cascade_picker: ^0.0.3" to clipboard
cascade_picker: ^0.0.3 copied to clipboard

outdated

级联选择器

cascade_picker #

级联选择器

Usage #

1. Depend

Add this to you package's pubspec.yaml file:

dependencies:
  cascade_picker: ^0.0.3

2. Install

Run command:

$ flutter packages get

3. Import

Import in Dart code:

import 'package:cascade_picker/cascade_picker.dart';

4. Show

/// initialPageData: 第一页的数据
/// nextPageData: 下一页的数据,点击当前页的选择项后加载下一页
/// controller: 控制器,用于获取已选择的数据
/// maxPageNum: 最大页数
/// 
/// final _cascadeController = CascadeController();
/// 
/// CascadePicker(
///   initialPageData: ['a', 'b', 'c', 'd'],
///   nextPageData: (callback, currentPage, selectIndex) async {
///     return ['one', 'two', 'three']
///   },
///   controller: _cascadeController,
///   maxPageNum: 4,
/// )
/// 
/// InkBox(
///   child: Container(...)
///   onTap: () {
///     if (_cascadeController.isCompleted()) {
///       List<String> selectedTitles = _cascadeController.selectedTitles;
///       List<int> selectedIndexes = _cascadeController.selectedIndexes;
///     }
///   }
/// )

效果 #

Demo 1

demo 2

9
likes
0
points
35
downloads

Publisher

unverified uploader

Weekly Downloads

级联选择器

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on cascade_picker