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:
CompositeVariant
support:all
,any
,none
,atLeast
- Named constructors:
.any
,.none
,.atLeast
(backward-compatible) onAllow
,onDeny
, andonError
callbacksbuilder
mode for fine-grained renderingdebug
flag 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
AccessContextProvider
for injecting access logic viaInheritedWidget
- New
ContextAccessGate
widget: supportsallow
function, 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 #
CompositeAccessGate
internally refactored to improve maintainability- Better code comments, inline DartDoc and debug readability
- Updated
README.md
and 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
DebugGate
for debug-only componentsAccessStrategy
,AccessStrategyProvider
for flexibilityMultiAccessStrategy
for combining strategiesFeatureFlagsController
,FeatureFlags
for managing feature flags- Lightweight
SimpleFeatureGate
- Example usage in
example/
- Full unit test coverage