Skip to content

Commit 9f87dd2

Browse files
authored
Merge pull request #9 from nylo-core/master
v2.3.0 - updates
2 parents 711fd17 + a2b07ff commit 9f87dd2

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [2.3.0] - 2021-12-12
2+
3+
* Fix [BaseController] construct method
4+
* override setState in NyState
5+
16
## [2.2.1] - 2021-12-10
27

38
* Upgrade to Dart 2.15

lib/controllers/controller.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ abstract class BaseController {
3131

3232
/// Initialize your controller with this method.
3333
/// It contains same [BuildContext] as the [NyStatefulWidget].
34-
construct(BuildContext context) async {}
34+
construct(BuildContext context) async {
35+
this.context = context;
36+
}
3537
}

lib/widgets/ny_state.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ abstract class NyState<T extends StatefulWidget> extends State<T> {
2525
super.dispose();
2626
}
2727

28+
@override
29+
void setState(VoidCallback fn) {
30+
if (mounted) {
31+
super.setState(fn);
32+
}
33+
}
34+
2835
/// Initialize your widget in [widgetDidLoad].
2936
///
3037
/// * [widgetDidLoad] is called after the [initState] method.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nylo_support
22
description: Support library for the Nylo framework. This library supports routing, widgets, localization, cli, storage and more.
3-
version: 2.2.1
3+
version: 2.3.0
44
homepage: https://nylo.dev
55
repository: https://github.com/nylo-core/support
66
issue_tracker: https://github.com/nylo-core/support/issues

0 commit comments

Comments
 (0)