dropdown_button_plus 0.0.2 copy "dropdown_button_plus: ^0.0.2" to clipboard
dropdown_button_plus: ^0.0.2 copied to clipboard

A new Flutter material DropdownButton Plus package.

A Flutter material DropdownButton Plus package. #

Getting started 🍺:

Add the flowing to your pubspec.yaml:

dependencies:
  dropdown_button_plus: any

import #

import 'package:dropdown_button_plus/dropdown_plus.dart' as plus;

Basic: #

The same usage as the DropdownButton of flutter sdk.

plus.DropdownView<String>(
  items: filters,
  itemPadding: EdgeInsets.zero,
  itemBuilder: (_, index, select) => ItemMenuString(
    label: filters[index],
    select: select,
    showIndicator: false,
    mainAxisAlignment: MainAxisAlignment.center,
  ),
  selectedItemBuilder: (_, index, select) => ItemMenuHeader(
    label: filters[index],
  ),
),

Plus : #

1.dropdown at button with shadow. #

plus.DropdownView<String>(
  forceWidth: true,
  isDropdown: true,
  isOutsideShadow: true,
  isPinnedSelected: false,
  items: filters,
  itemBuilder: (_, index, select) => ItemMenuString(
    label: filters[index],
    select: select,
  ),
  selectedItemBuilder: (_, index, select) => ItemMenuHeader(
    label: '综合排序',
    select: select,
  ),
),

plus basic

2.customize #

SizedBox(
  height: kMinInteractiveDimension,
  child: DropdownView<String>(
    forceWidth: true,
    isDropdown: true,
    isOutsideShadow: true,
    isPinnedSelected: false,
    itemPadding: EdgeInsets.zero,
    itemHeight: MediaQuery.of(context).size.height / 2,
    items: const [''],
    itemBuilder: (_, index, select) => ItemMenuOption(
      onChanged: widget.onOption,
    ),
    selectedItemBuilder: (_, index, select) => ItemMenuHeader(
      label: '对账单',
      select: select,
    ),
  ),
),

plus_customize

3
likes
70
pub points
68%
popularity

Publisher

unverified uploader

A new Flutter material DropdownButton Plus package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on dropdown_button_plus