NiceAuthGuard constructor

const NiceAuthGuard({
  1. Key? key,
  2. required Widget child,
  3. bool isAuthenticated = false,
  4. List<String> requiredPermissions = const [],
  5. List<String> currentPermissions = const [],
  6. List<String> requiredRoles = const [],
  7. List<String> currentRoles = const [],
  8. bool requireAll = true,
  9. Widget? fallback,
  10. Widget? unauthorizedFallback,
  11. VoidCallback? onUnauthorized,
  12. bool loading = false,
  13. 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,
});