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.*
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/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
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