User Interface low complexity Shared Component mobile
0
Dependencies
2
Dependents
0
Entities
0
Integrations

Description

Reusable card widget for displaying peer mentor-specific information including availability status, assigned members count, and certification state. Distinct visual treatment from the generic contact card to communicate mentor context at a glance.

Feature: Contact List Management

peer-mentor-card-widget

Summaries

The Peer Mentor Card Widget provides a visually distinct representation of peer mentors within the application, communicating their availability, certification status, and assigned member workload at a glance. This specialized presentation helps coordinators and administrators quickly identify the right mentor to assign or contact, reducing the time needed to match members with appropriate support resources. By visually differentiating peer mentors from standard contacts, the interface reduces cognitive load and operational errors such as reaching out to unavailable or uncertified mentors. As a shared component reused across multiple screens, it delivers this operational efficiency improvement once and propagates it throughout the product with no additional implementation cost per use.

This low-complexity shared widget has no external dependencies and can be built and stabilized early, making it a strong candidate for parallel development alongside other independent components. Its shared status means changes will affect multiple screens simultaneously, so visual regression tests should be written at delivery and maintained going forward. Acceptance criteria must explicitly cover: availability indicator states (available and unavailable), certification badge rendering across multiple status values including null, assigned member count display, and WCAG 2.2 AA contrast compliance. Coordinate with the design team to confirm the intentional visual differentiation from the generic ContactCard is approved before development begins, as this distinction is a functional requirement for communicating mentor context.

PeerMentorCard is a stateless Flutter widget accepting a required PeerMentor model and an optional VoidCallback onTap. It renders mentor name, an availability indicator via _buildAvailabilityIndicator(bool), a certification badge via _buildCertificationBadge(String?), and an assigned member count via _buildAssignedCount(int). All styling must use design tokens for WCAG 2.2 AA compliance. Do not refactor this into a generic shared card with ContactCard—the PeerMentor data model and visual semantics are intentionally different.

The onTap callback delegates routing to the parent. Enforce the same no-side-effects discipline as ContactCard: no Provider access, no Navigator calls within the widget. Handle null certStatus gracefully in _buildCertificationBadge with a sensible fallback. Add golden tests covering all availability and certification state combinations.

Responsibilities

  • Display peer mentor name, availability, and certification status
  • Show assigned member count or territory where relevant
  • Handle tap navigation to peer mentor detail screen
  • Apply design token styling with WCAG 2.2 AA compliance

Interfaces

PeerMentorCard({required PeerMentor mentor, VoidCallback? onTap})
build(BuildContext context)
_buildAvailabilityIndicator(bool isAvailable)
_buildCertificationBadge(String? certStatus)
_buildAssignedCount(int count)

Relationships

Dependents (2)

Components that depend on this component