From d77e8c0ff4a78c5f6773f6c150fb3a173350d3b4 Mon Sep 17 00:00:00 2001 From: Anthony Date: Mon, 15 Jan 2024 19:06:21 +0700 Subject: [PATCH] v5.19.0 --- CHANGELOG.md | 6 ++++++ example/pubspec.lock | 14 +++++++++++--- lib/metro/stubs/page_stub.dart | 9 +++++++-- lib/metro/stubs/page_w_controller_stub.dart | 12 ++++++++++-- lib/nylo_framework.dart | 2 +- pubspec.lock | 12 ++++++++++-- pubspec.yaml | 4 ++-- 7 files changed, 47 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87ba61b..9edef45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [5.19.0] - 2024-01-15 + +* Update page and controller stub to use `view` instead of `build` +* Update the page and controller stub to include controller getter +* Update pubspec.yaml + ## [5.18.9] - 2024-01-13 * Update pubspec.yaml diff --git a/example/pubspec.lock b/example/pubspec.lock index 61f1dff..57a65a3 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -251,15 +251,15 @@ packages: path: ".." relative: true source: path - version: "5.18.9" + version: "5.19.0" nylo_support: dependency: transitive description: name: nylo_support - sha256: "07c9e15d74f6d301ec175f16863a3b8b08facf32c5cce5a5594a657d4fdd032b" + sha256: "1599c99829be2dca30420a5b9d2f1c7b389fda7c484ccdf9a2a46af0be3274bb" url: "https://pub.dev" source: hosted - version: "5.30.1" + version: "5.31.0" page_transition: dependency: transitive description: @@ -428,6 +428,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" + skeletonizer: + dependency: transitive + description: + name: skeletonizer + sha256: "86f373126d9a887a2d63f2463a9913a973ce7f282efa7f0d9d06a17e3f19838c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" sky_engine: dependency: transitive description: flutter diff --git a/lib/metro/stubs/page_stub.dart b/lib/metro/stubs/page_stub.dart index be2f1b0..a40dc00 100644 --- a/lib/metro/stubs/page_stub.dart +++ b/lib/metro/stubs/page_stub.dart @@ -15,12 +15,17 @@ class _${className.pascalCase}PageState extends NyState<${className.pascalCase}P @override init() async { - super.init(); } + + /// Use boot if you need to load data before the view is rendered. + // @override + // boot() async { + // + // } @override - Widget build(BuildContext context) { + Widget view(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("${className.titleCase}") diff --git a/lib/metro/stubs/page_w_controller_stub.dart b/lib/metro/stubs/page_w_controller_stub.dart index 9a4193c..429ee9c 100644 --- a/lib/metro/stubs/page_w_controller_stub.dart +++ b/lib/metro/stubs/page_w_controller_stub.dart @@ -16,14 +16,22 @@ class ${className.pascalCase}Page extends NyStatefulWidget<${className.pascalCas class _${className.pascalCase}PageState extends NyState<${className.pascalCase}Page> { + /// [${className.pascalCase}Controller] controller + ${className.pascalCase}Controller get controller => widget.controller; + @override init() async { - super.init(); } + + /// Use boot if you need to load data before the view is rendered. + // @override + // boot() async { + // + // } @override - Widget build(BuildContext context) { + Widget view(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("${className.titleCase}") diff --git a/lib/nylo_framework.dart b/lib/nylo_framework.dart index 1aa12c3..3a00e4f 100644 --- a/lib/nylo_framework.dart +++ b/lib/nylo_framework.dart @@ -42,4 +42,4 @@ export 'package:nylo_support/networking/ny_base_api_service.dart'; export 'package:dio/dio.dart'; /// Nylo version -const String nyloVersion = 'v5.18.9'; +const String nyloVersion = 'v5.19.0'; diff --git a/pubspec.lock b/pubspec.lock index 7ba25a2..6f913dd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -249,10 +249,10 @@ packages: dependency: "direct main" description: name: nylo_support - sha256: "07c9e15d74f6d301ec175f16863a3b8b08facf32c5cce5a5594a657d4fdd032b" + sha256: "1599c99829be2dca30420a5b9d2f1c7b389fda7c484ccdf9a2a46af0be3274bb" url: "https://pub.dev" source: hosted - version: "5.30.1" + version: "5.31.0" page_transition: dependency: "direct main" description: @@ -421,6 +421,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" + skeletonizer: + dependency: transitive + description: + name: skeletonizer + sha256: "86f373126d9a887a2d63f2463a9913a973ce7f282efa7f0d9d06a17e3f19838c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" sky_engine: dependency: transitive description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index d53e80f..0fbf114 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: 5.18.9 +version: 5.19.0 homepage: https://nylo.dev repository: https://github.com/nylo-core/framework/tree/5.x issue_tracker: https://github.com/nylo-core/framework/issues @@ -16,7 +16,7 @@ environment: dependencies: flutter_dotenv: ^5.1.0 - nylo_support: ^5.30.1 + nylo_support: ^5.31.0 theme_provider: ^0.6.0 page_transition: ^2.1.0 cli_dialog: ^0.5.0