From 5efce3349dbf11fe9412e8e8d2de277532466839 Mon Sep 17 00:00:00 2001 From: Akshath Jain Date: Wed, 25 Sep 2019 14:17:59 -0400 Subject: [PATCH 1/4] fixed issue where panel listeners (onPanelClosed/Opened/Slide) would be called before UI render --- lib/src/panel.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/src/panel.dart b/lib/src/panel.dart index 6330e8e..742237f 100644 --- a/lib/src/panel.dart +++ b/lib/src/panel.dart @@ -184,6 +184,7 @@ class _SlidingUpPanelState extends State with SingleTickerProvid _ac = new AnimationController( vsync: this, duration: const Duration(milliseconds: 300), + value: widget.defaultPanelState == PanelState.CLOSED ? 0.0 : 1.0 //set the default panel state (i.e. set initial value of _ac) )..addListener((){ setState((){}); @@ -207,10 +208,6 @@ class _SlidingUpPanelState extends State with SingleTickerProvid _isPanelClosed, _isPanelShown, ); - - //set the default panel state - if(widget.defaultPanelState == PanelState.CLOSED) _ac.value = 0.0; - else if (widget.defaultPanelState == PanelState.OPEN) _ac.value = 1.0; } @override From 62780668ef5e8fd174e064ca62bdc54f0c86a574 Mon Sep 17 00:00:00 2001 From: Akshath Jain Date: Wed, 25 Sep 2019 14:22:39 -0400 Subject: [PATCH 2/4] updated documentation to match changes --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- example/ios/Flutter/flutter_export_environment.sh | 10 ++++++++++ pubspec.yaml | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 example/ios/Flutter/flutter_export_environment.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d5720..0831941 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [0.3.6] - [September 25, 2019] + +#### Fixes +- Fixed issues #54, #59 where panel listeners would be called before UI was rendered (related to `defaultPanelState`) + +#### Documentation +- Updated the documentation to reflect fixes + + + ## [0.3.5] - [August 31, 2019] #### Features diff --git a/README.md b/README.md index 8a4f0fb..035dcdc 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A draggable Flutter widget that makes implementing a SlidingUpPanel much easier! Add the following to your `pubspec.yaml` file: ```yaml dependencies: - sliding_up_panel: ^0.3.5 + sliding_up_panel: ^0.3.6 ```
diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100755 index 0000000..116514c --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/Users/akshath/Library/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/akshath/Documents/Programming Projects/sliding_up_panel/example" +export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build/ios" +export "FLUTTER_FRAMEWORK_DIR=/Users/akshath/Library/flutter/bin/cache/artifacts/engine/ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index e7cf139..79c44e1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: sliding_up_panel description: A draggable Flutter widget that makes implementing a SlidingUpPanel much easier! -version: 0.3.5 +version: 0.3.6 author: Akshath Jain homepage: https://github.com/akshathjain/sliding_up_panel From 6ed3af07689c6ddca5450c719df1f2e9ce530254 Mon Sep 17 00:00:00 2001 From: Akshath Jain Date: Wed, 25 Sep 2019 14:24:19 -0400 Subject: [PATCH 3/4] updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6c5f757..63296ea 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ playground/ **/ios/Flutter/app.flx **/ios/Flutter/app.zip **/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh **/ios/ServiceDefinitions.json **/ios/Runner/GeneratedPluginRegistrant.* From 2776a850418f861ae600c9337bf38dbd927ebf00 Mon Sep 17 00:00:00 2001 From: Akshath Jain Date: Wed, 25 Sep 2019 14:26:17 -0400 Subject: [PATCH 4/4] removed untrackted files --- example/ios/Flutter/flutter_export_environment.sh | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100755 example/ios/Flutter/flutter_export_environment.sh diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh deleted file mode 100755 index 116514c..0000000 --- a/example/ios/Flutter/flutter_export_environment.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Users/akshath/Library/flutter" -export "FLUTTER_APPLICATION_PATH=/Users/akshath/Documents/Programming Projects/sliding_up_panel/example" -export "FLUTTER_TARGET=lib/main.dart" -export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build/ios" -export "FLUTTER_FRAMEWORK_DIR=/Users/akshath/Library/flutter/bin/cache/artifacts/engine/ios" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1.0.0"