diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1c1b67e..6b496c0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## [0.5.2] - 2021-01-31
+
+* Fix `onPop` called on null
+* Pass new "result" into `pop` method
+
## [0.5.1] - 2021-01-30
* `flutter format`
diff --git a/README.md b/README.md
index 09ba86e..b55f4a2 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
-## Nylo Framework (Beta v0.5.0)
+## Nylo Framework (Beta v0.5.2)
Nylo is a micro-framework for Flutter which is designed to help simplify app development. Every project provides a simple boilerplate and MVC pattern to help you build apps easier.
diff --git a/lib/widgets/ny_state.dart b/lib/widgets/ny_state.dart
index 1aaff83..af85fac 100644
--- a/lib/widgets/ny_state.dart
+++ b/lib/widgets/ny_state.dart
@@ -17,8 +17,8 @@ abstract class NyState extends State {
widgetDidLoad() async {}
- pop() {
- Navigator.of(context).pop();
+ pop({dynamic result}) {
+ Navigator.of(context).pop(result);
}
routeTo(String routeName,
@@ -31,7 +31,7 @@ abstract class NyState extends State {
Curve transitionCurve,
Map params,
CustomSailorTransition customTransition,
- Function() onPop}) {
+ Function(dynamic value) onPop}) {
NyArgument nyArgument = NyArgument(data);
NyNavigator.instance.router
.navigate(
@@ -46,6 +46,6 @@ abstract class NyState extends State {
params: params,
customTransition: customTransition,
)
- .then((v) => onPop());
+ .then((v) => onPop != null ? onPop(v) : (v) {});
}
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 072be1c..1c4a216 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: nylo_framework
description: Micro-framework for Flutter that's built to simplify app development for Flutter projects.
-version: 0.5.1
+version: 0.5.2
homepage: https://nylo.dev
repository: https://github.com/nylo-core/framework
issue_tracker: https://github.com/nylo-core/framework/issues