diff --git a/CHANGELOG.md b/CHANGELOG.md
index 240be88..b3b353f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## [1.0.3] - [2019-08-06]
+ * When the drop-down menu appears, click on the margin to collapse the menu, but the icon of header remains unchanged (https://github.com/GanZhiXiong/gzx_dropdown_menu/issues/2#issue-469594783)
+ * Slide the interface to the right and write the input field and the keypad will pop up causing the list to report an error (https://github.com/GanZhiXiong/gzx_dropdown_menu/issues/1#issue-467276935)
+
## [1.0.2] - [2019-06-06]
* update readme
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index af4b15e..3c1144b 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -153,6 +153,7 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
+ DevelopmentTeam = 5TJCW7YTN9;
LastSwiftMigration = 0910;
};
};
@@ -307,7 +308,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = S8QB4VV633;
+ DEVELOPMENT_TEAM = 5TJCW7YTN9;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -436,6 +437,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 5TJCW7YTN9;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -464,6 +466,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 5TJCW7YTN9;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -508,7 +511,6 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
-
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/example/lib/gzx_dropdown_menu_test_page.dart b/example/lib/gzx_dropdown_menu_test_page.dart
index f9cac0f..a6e4c1d 100644
--- a/example/lib/gzx_dropdown_menu_test_page.dart
+++ b/example/lib/gzx_dropdown_menu_test_page.dart
@@ -14,7 +14,7 @@ class GZXDropDownMenuTestPage extends StatefulWidget {
}
class _GZXDropDownMenuTestPageState extends State {
- List _dropDownHeaderItemStrings = ['全城', '品牌', '价格低', '筛选'];
+ List _dropDownHeaderItemStrings = ['全城', '品牌', '距离近', '筛选'];
List _brandSortConditions = [];
List _distanceSortConditions = [];
SortCondition _selectBrandSortCondition;
@@ -51,6 +51,8 @@ class _GZXDropDownMenuTestPageState extends State {
_distanceSortConditions.add(SortCondition(name: '距离近', isSelected: true));
_distanceSortConditions.add(SortCondition(name: '价格低', isSelected: false));
+ _distanceSortConditions.add(SortCondition(name: '价格高', isSelected: false));
+
_selectDistanceSortCondition = _distanceSortConditions[0];
}
@@ -71,6 +73,13 @@ class _GZXDropDownMenuTestPageState extends State {
endDrawer: Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width / 4, top: 0),
color: Colors.white,
+// child: Container(color: Colors.red,child: Padding(
+// padding: const EdgeInsets.all(8.0),
+// child: TextField(),
+// ),),
+ child: ListView(
+ children: [TextField()],
+ ),
),
body: Stack(
key: _stackKey,
@@ -108,7 +117,6 @@ class _GZXDropDownMenuTestPageState extends State {
onItemTap: (index) {
if (index == 3) {
_scaffoldKey.currentState.openEndDrawer();
- _dropdownMenuController.hide();
}
},
// // 头部的高度
@@ -179,8 +187,8 @@ class _GZXDropDownMenuTestPageState extends State {
GZXDropdownMenuBuilder(
dropDownHeight: 40.0 * _distanceSortConditions.length,
dropDownWidget: _buildConditionListWidget(_distanceSortConditions, (value) {
- _dropDownHeaderItemStrings[2] = _selectDistanceSortCondition.name;
_selectDistanceSortCondition = value;
+ _dropDownHeaderItemStrings[2] = _selectDistanceSortCondition.name;
_dropdownMenuController.hide();
setState(() {});
})),
@@ -193,7 +201,6 @@ class _GZXDropDownMenuTestPageState extends State {
int _selectTempFirstLevelIndex = 0;
int _selectFirstLevelIndex = 0;
-
int _selectSecondLevelIndex = -1;
_buildAddressWidget(void itemOnTap(String selectValue)) {
@@ -288,7 +295,7 @@ class _GZXDropDownMenuTestPageState extends State {
);
}
- _buildConditionListWidget(items, void itemOnTap(sortCondition)) {
+ _buildConditionListWidget(items, void itemOnTap(SortCondition sortCondition)) {
return ListView.separated(
shrinkWrap: true,
scrollDirection: Axis.vertical,
diff --git a/example/lib/main.dart b/example/lib/main.dart
index ff66956..a6641ba 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'gzx_dropdown_menu_test_page.dart';
+import 'test_page.dart';
void main() {
print('main');
@@ -26,6 +27,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.blue,
),
home: GZXDropDownMenuTestPage(),
+// home: TestPage(),
);
}
-}
\ No newline at end of file
+}
diff --git a/example/pubspec.lock b/example/pubspec.lock
index dbe2380..41b156a 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -1,5 +1,5 @@
# Generated by pub
-# See https://www.dartlang.org/tools/pub/glossary#lockfile
+# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
@@ -52,7 +52,7 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.0"
+ version: "1.0.2"
matcher:
dependency: transitive
description:
@@ -80,7 +80,7 @@ packages:
name: pedantic
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.5.0"
+ version: "1.7.0"
quiver:
dependency: transitive
description:
@@ -150,4 +150,4 @@ packages:
source: hosted
version: "2.0.8"
sdks:
- dart: ">=2.2.0 <3.0.0"
+ dart: ">=2.2.2 <3.0.0"
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index d12f5a1..35c9e43 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -25,9 +25,11 @@ dependencies:
cupertino_icons: ^0.1.2
# gzx_dropdown_menu : ^1.0.0
+
# gzx_dropdown_menu :
# git:
# url: https://github.com/GanZhiXiong/gzx_dropdown_menu.git
+
gzx_dropdown_menu :
path : ../
diff --git a/lib/src/gzx_dropdown_header.dart b/lib/src/gzx_dropdown_header.dart
index bb5df1d..8489172 100644
--- a/lib/src/gzx_dropdown_header.dart
+++ b/lib/src/gzx_dropdown_header.dart
@@ -61,6 +61,7 @@ class _GZXDropDownHeaderState extends State with SingleTicker
}
_onController() {
+ setState(() {});
// print(widget.controller.menuIndex);
}
diff --git a/lib/src/gzx_dropdown_menu.dart b/lib/src/gzx_dropdown_menu.dart
index a5014f4..4b21e58 100644
--- a/lib/src/gzx_dropdown_menu.dart
+++ b/lib/src/gzx_dropdown_menu.dart
@@ -90,7 +90,7 @@ class _GZXDropDownMenuState extends State with SingleTickerProv
if (_isShowMask) {
return GestureDetector(
onTap: () {
- _hideDropDownItemWidget();
+ widget.controller.hide();
},
child: Container(
width: MediaQuery.of(context).size.width,
@@ -108,6 +108,10 @@ class _GZXDropDownMenuState extends State with SingleTickerProv
Widget _buildDropDownWidget() {
int menuIndex = widget.controller.menuIndex;
+ if (menuIndex >= widget.menus.length) {
+ return Container();
+ }
+
return Positioned(
width: MediaQuery.of(context).size.width,
top: widget.controller.dropDownHearderHeight,
diff --git a/pubspec.lock b/pubspec.lock
index 10f7aaa..5309463 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1,5 +1,5 @@
# Generated by pub
-# See https://www.dartlang.org/tools/pub/glossary#lockfile
+# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
@@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.1.0"
+ version: "2.2.0"
boolean_selector:
dependency: transitive
description:
@@ -66,14 +66,14 @@ packages:
name: pedantic
url: "https://pub.flutter-io.cn"
source: hosted
- version: "1.5.0"
+ version: "1.7.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.flutter-io.cn"
source: hosted
- version: "2.0.2"
+ version: "2.0.3"
sky_engine:
dependency: transitive
description: flutter
@@ -120,7 +120,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
- version: "0.2.4"
+ version: "0.2.5"
typed_data:
dependency: transitive
description:
@@ -136,4 +136,4 @@ packages:
source: hosted
version: "2.0.8"
sdks:
- dart: ">=2.2.0 <3.0.0"
+ dart: ">=2.2.2 <3.0.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index fd3c2da..b1e5e84 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: gzx_dropdown_menu
description: A custom is strong dropdown menu for Flutter.
-version: 1.0.2
+version: 1.0.3
author: GanZhiXiong
homepage: https://github.com/GanZhiXiong/gzx_dropdown_menu