From 6b3e185de2680d3e5f56db46888a5dc3dc93097d Mon Sep 17 00:00:00 2001 From: Anthony Date: Tue, 31 Dec 2024 11:53:40 +0700 Subject: [PATCH] v6.14.0 --- CHANGELOG.md | 5 +++++ LICENSE | 2 +- lib/widgets/navigation_hub/navigation_hub.dart | 11 +++++++++++ pubspec.yaml | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c5b57f..ae45d5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [6.14.0] - 2024-12-31 + +* Update copyright year +* New `currentTabIndex` method added to `NavigationHubStateActions` to set the current tab index + ## [6.13.1] - 2024-12-29 * Fix form.dart diff --git a/LICENSE b/LICENSE index 8304f9f..80c3207 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Anthony Gordon +Copyright (c) 2025 Anthony Gordon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/lib/widgets/navigation_hub/navigation_hub.dart b/lib/widgets/navigation_hub/navigation_hub.dart index d9c9c73..3211d9f 100644 --- a/lib/widgets/navigation_hub/navigation_hub.dart +++ b/lib/widgets/navigation_hub/navigation_hub.dart @@ -89,6 +89,12 @@ abstract class NavigationHub extends NyState { reset[index] = true; break; } + case 'update-tab': + { + int index = data['tab-index']; + currentIndex = index; + break; + } default: {} } @@ -570,4 +576,9 @@ class NavigationHubStateActions extends StateActions { await NyStorage.save(_navigationTabStateName(tab), 0); updateState(_navigationTabStateName(tab), data: 0); } + + /// Update the tab index + currentTabIndex(int tabIndex) { + updateState(state, data: {"action": "update-tab", "tab-index": tabIndex}); + } } diff --git a/pubspec.yaml b/pubspec.yaml index 517b4f5..9678e08 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: nylo_support description: Support library for the Nylo framework. This library supports routing, widgets, localization, cli, storage and more. -version: 6.13.1 +version: 6.14.0 homepage: https://nylo.dev repository: https://github.com/nylo-core/support/tree/6.x issue_tracker: https://github.com/nylo-core/support/issues