flutter_access_gates 0.2.5
flutter_access_gates: ^0.2.5 copied to clipboard
A declarative access control layer for Flutter UI. Includes FeatureGate, PermissionGate, and support for hot-reloadable flags.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and follows Semantic Versioning.
0.2.5 - 2025-06-16 #
Added #
-
CompositeAccessGate Enhancements:
CompositeVariantsupport:all,any,none,atLeast- Named constructors:
.any,.none,.atLeast(backward-compatible) onAllow,onDeny, andonErrorcallbacksbuildermode for fine-grained renderingdebugflag for logging condition evaluation- Full widget tests for sync/async + edge cases
-
AccessContext System (Experimental):
- Introduced
AccessContext<R, P, F>interface for DI-agnostic, type-safe access logic - Added
AccessContextProviderfor injecting access logic viaInheritedWidget - New
ContextAccessGatewidget: supportsallowfunction, fallback, async conditions, and builder-mode rendering - Complete examples and documentation in
/doc/access_context_*.md(EN + RU) - Designed to support Riverpod, BLoC, and non-Flutter platforms
- Introduced
Changed #
CompositeAccessGateinternally refactored to improve maintainability- Better code comments, inline DartDoc and debug readability
- Updated
README.mdand linked new docs for quick access
Note #
AccessContext is non-breaking and fully optional. Existing gates and BuildContext-based usage continue to work without changes. You can gradually adopt the new pattern if needed.
0.2.4 - 2025-06-11 #
0.2.3 - 2025-06-11 #
0.2.2 - 2025-06-10 #
0.2.1 - 2025-06-09 #
0.2.0 - 2025-06-09 #
0.1.0 - 2025-06-09 #
Added #
- Base gates:
FeatureGate,RoleGate,PermissionGate - Composition:
CompositeAccessGate,GateUiBuilder DebugGatefor debug-only componentsAccessStrategy,AccessStrategyProviderfor flexibilityMultiAccessStrategyfor combining strategiesFeatureFlagsController,FeatureFlagsfor managing feature flags- Lightweight
SimpleFeatureGate - Example usage in
example/ - Full unit test coverage