Skip to content

GuardBuilder #6

@Tanvirul-swe

Description

@Tanvirul-swe

Provides raw access to the role check logic — useful when you want full control over what to render (like showing icons, logs, or animations based on access).

🔧 Planned API

GuardBuilder(
  guard: guard,
  requiredRoles: ['admin'],
  builder: (context, hasAccess) {
    return hasAccess
        ? const Icon(Icons.check_circle, color: Colors.green)
        : const Icon(Icons.cancel, color: Colors.red);
  },
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions