Proxy Peer Mentor Selector
Component Detail
Description
Search and select widget that lets a coordinator pick one or more peer mentors from their chapter's roster. Supports typeahead search by name and displays key identifiers to prevent selection errors.
proxy-peer-mentor-selector
Summaries
The Proxy Peer Mentor Selector is a shared UI component that prevents one of the most common data quality failures in proxy registration workflows: selecting the wrong peer mentor. By displaying name, chapter affiliation, and status badge alongside typeahead search results, it gives coordinators the context needed to confirm identity before attributing an activity to someone. This directly protects the accuracy of activity records used in Bufdir compliance reports, reducing the risk of misattributed data that could distort program evaluation outcomes. As a shared component used across both individual proxy registration and bulk group registration, it delivers this quality safeguard consistently without duplicating implementation effort.
This is a medium-complexity shared widget with no declared external dependencies, making it an ideal early deliverable that unblocks both the proxy-registration-screen and the bulk-registration-screen. Because both consuming screens depend on this selector, any delay in its delivery directly delays integration testing for the entire proxy registration feature track. The dual-mode interface — single-select for individual proxy workflows and multi-select for bulk registration — must be explicitly tested in both configurations to ensure mode switching does not leave stale selection state. Typeahead performance against a large chapter roster should be validated on lower-end Android devices typical of field coordinators, as debounce tuning may be required to prevent excessive query load.
This Flutter widget exposes a unified build method with a multiSelect boolean flag that switches between single-select and multi-select emission modes — onSingleSelected emits a String mentorId while onMultiSelected emits a List
clearSelection() must reset both the internal Set and the search query field. Because this is a shared component, avoid embedding navigation or Scaffold-level side effects — keep it a pure stateful widget.
Responsibilities
- Provide typeahead search filtered to coordinator's chapter
- Display peer mentor name, chapter, and status badge
- Support single-select mode (individual proxy) and multi-select mode (bulk)
- Emit selected mentor IDs to parent screen
Interfaces
build(BuildContext context, {bool multiSelect})
onSingleSelected(String mentorId)
onMultiSelected(List<String> mentorIds)
onSearchQueryChanged(String query)
clearSelection()
getSelectedIds()