From c0447943b07b1466605edadfb7c376074cf2eb72 Mon Sep 17 00:00:00 2001 From: GanZhiXiong <1551935335@qq.com> Date: Wed, 3 Jun 2020 14:37:33 +0800 Subject: [PATCH] Publish v2.1.0 --- CHANGELOG.md | 10 ++++++++++ README.md | 22 +++++++++++++++++++--- example/pubspec.yaml | 5 ++++- pubspec.yaml | 2 +- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12bc7fb..1784374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [2.1.0] - [2020-06-03] +### ✨ New Features +* GZXDropDownMenu add dropdownMenuChanging and dropdownMenuChanged callback +* GZXDropDownHeaderItem add style (see https://github.com/GanZhiXiong/gzx_dropdown_menu/issues/27) +### ⚡️ Improvements +* Add removeListener and removeStatusListener when the animation is recreated +* Reduced calls to setstate +### 🐛 Bug Fixes +* Fixed Dropdown menu hide mask no animation + ## [2.0.0+2] - [2020-05-11] * Update Readme diff --git a/README.md b/README.md index ec4eb3a..a80beab 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ A custom is strong dropdown menu for Flutter. Easy to use and powerful for custo * Custom dropdown menu animation * Control dropdown menu show or hide +**[点我查看版本更新记录](https://pub.flutter-io.cn/packages/gzx_dropdown_menu#-changelog-tab-)** + ## 开源不易🙀🙀🙀,麻烦给个Star⭐️吧!我会根据大家的关注度和个人时间持续更新代码! **如你想接收更新消息,你可以Watch下,有问题请提到Issues。** @@ -47,12 +49,14 @@ A custom is strong dropdown menu for Flutter. Easy to use and powerful for custo 打开pubspec.yaml文件 添加如下代码 ``` dart - gzx_dropdown_menu : ^2.0.0 + gzx_dropdown_menu : ^2.1.0 ``` 添加后打开Terminal,执行flutter packages get ### 2、使用 -打开本仓库example项目下的gzx_dropdown_menu_test_page.dart文件自己看。 +- **强烈建议你先clone下本仓库** +- 然后运行下看下效果 +- 打开本仓库example项目下的gzx_dropdown_menu_test_page.dart文件自己看。 没空编辑文字了,而且说这么多还不如你直接运行下看下效果,然后看下代码,就知道如何使用了。 @@ -67,7 +71,7 @@ A custom is strong dropdown menu for Flutter. Easy to use and powerful for custo items: [ GZXDropDownHeaderItem(_dropDownHeaderItemStrings[0]), GZXDropDownHeaderItem(_dropDownHeaderItemStrings[1]), - GZXDropDownHeaderItem(_dropDownHeaderItemStrings[2]), + GZXDropDownHeaderItem(_dropDownHeaderItemStrings[2], style: TextStyle(color: Colors.green)), GZXDropDownHeaderItem(_dropDownHeaderItemStrings[3], iconData: Icons.filter_frames, iconSize: 18), ], // GZXDropDownHeader对应第一父级Stack的key @@ -118,6 +122,18 @@ A custom is strong dropdown menu for Flutter. Easy to use and powerful for custo animationMilliseconds: 500, // 下拉后遮罩颜色 maskColor: Colors.red.withOpacity(0.5), + dropdownMenuChanging: (isShow, index) { + setState(() { + _dropdownMenuChange = '(正在${isShow ? '显示' : '隐藏'}$index)'; + print(_dropdownMenuChange); + }); + }, + dropdownMenuChanged: (isShow, index) { + setState(() { + _dropdownMenuChange = '(已经${isShow ? '显示' : '隐藏'}$index)'; + print(_dropdownMenuChange); + }); + }, // 下拉菜单,高度自定义,你想显示什么就显示什么,完全由你决定,你只需要在选择后调用_dropdownMenuController.hide();即可 menus: [ GZXDropdownMenuBuilder( diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 33ec9c2..1102f82 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -24,7 +24,10 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 -# gzx_dropdown_menu : ^2.0.0 + # ^1.2.3 等于 '>=1.2.3 <2.0.0' + # ^0.1.2 等于 '>=0.1.2 <0.2.0' + # see detail https://stackoverflow.com/questions/53563079/what-is-the-caret-sign-before-the-dependency-version-number-in-flutters-pub +# gzx_dropdown_menu : ^2.1.0 # gzx_dropdown_menu : # git: diff --git a/pubspec.yaml b/pubspec.yaml index 7ae1daf..21e8524 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: gzx_dropdown_menu description: A custom is strong dropdown menu for Flutter. Easy to use and powerful for customization, it's up to you what you want to display in the dropdown menu! -version: 2.0.0+2 +version: 2.1.0 homepage: https://github.com/GanZhiXiong/gzx_dropdown_menu environment: