NiceAuthGuard constructor
const
NiceAuthGuard({ - Key? key,
- required Widget child,
- bool isAuthenticated = false,
- List<String> requiredPermissions = const [],
- List<String> currentPermissions = const [],
- List<String> requiredRoles = const [],
- List<String> currentRoles = const [],
- bool requireAll = true,
- Widget? fallback,
- Widget? unauthorizedFallback,
- VoidCallback? onUnauthorized,
- bool loading = false,
- Widget? loadingWidget,
})
Implementation
const NiceAuthGuard({
super.key,
required this.child,
this.isAuthenticated = false,
this.requiredPermissions = const [],
this.currentPermissions = const [],
this.requiredRoles = const [],
this.currentRoles = const [],
this.requireAll = true,
this.fallback,
this.unauthorizedFallback,
this.onUnauthorized,
this.loading = false,
this.loadingWidget,
});