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

A customizable flutter dropdown ui.

fdropdown #

A customizable flutter dropdown ui.

Getting Started #

1、必须设置目标组件key

final GlobalKey selectAreaKey = GlobalKey();

2、关联到目标组件

appBar: AppBar(
          key: selectAreaKey,
      backgroundColor: Colors.blue,
      title: const Text('自定义下拉菜单'),
    ),

3、展示常用菜单

FDropdown.instance.show(
   distWidgetKey: selectAreaKey,
    allMarginTop: 2,
    allMarginRight: 2,
    child: ListView(
      padding: EdgeInsets.only(),
      shrinkWrap: true,
      children: items.map((e) => Container(
        height: 30,
        alignment: Alignment.center,
        color: Colors.amber,
        margin: EdgeInsets.only(
          bottom: 1
        ),
        child: Text(e),
      )).toList(),
    )
 )

输入图片说明

4、展示自定义自适应菜单

FDropdown.instance.show(
    distWidgetKey: selectAreaKey,
    allMarginTop: 0,
    isSelfExpand: true,
    align: OverlayAlign.CENTER,
    // contMarginLeft: 15,
    // contMarginRight: 15,
    allBgColor: Color(0x3f000000),
    child: ListView(
      padding: EdgeInsets.only(),
      shrinkWrap: true,
      children: items.map((e) => Container(
        height: 30,
        alignment: Alignment.centerLeft,
        color: Colors.amber,
        margin: EdgeInsets.only(
            bottom: 1
        ),
        child: Text(e),
      )).toList(),
    )
    )

输入图片说明

1
likes
130
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable flutter dropdown ui.

Repository

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on fdropdown