Summary
The trailing arrow icon in RemixSelect's trigger is hardcoded to Icons.keyboard_arrow_up / Icons.keyboard_arrow_down with no public API to customize it. The shared style spec also prevents styling the leading and trailing icons independently.
Current Behavior
RemixSelectTrigger only exposes two fields:
class RemixSelectTrigger {
final String placeholder;
final IconData? icon; // leading icon only
const RemixSelectTrigger({required this.placeholder, this.icon});
}
The trailing icon is hardcoded inside _RemixSelectTriggerWidget at packages/remix/lib/src/components/select/select_widget.dart:351-356:
StyledIcon(
icon: isOpen
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
styleSpec: spec.icon,
),
Additionally, both the leading icon (line 348) and the trailing icon (line 351) share the same spec.icon style slot, so even via styling there's no way to differentiate them.
Proposed Solution
-
Add fields to RemixSelectTrigger to override the trailing icon — likely a pair for the two states so the open/close affordance is preserved, with sensible defaults to keep this non-breaking:
final IconData trailingIconCollapsed; // default: Icons.keyboard_arrow_down
final IconData trailingIconExpanded; // default: Icons.keyboard_arrow_up
-
Add a separate trailingIcon slot to RemixSelectTriggerSpec (alongside the existing icon for the leading slot) so each icon can be styled independently.
Acceptance Criteria
Summary
The trailing arrow icon in
RemixSelect's trigger is hardcoded toIcons.keyboard_arrow_up/Icons.keyboard_arrow_downwith no public API to customize it. The shared style spec also prevents styling the leading and trailing icons independently.Current Behavior
RemixSelectTriggeronly exposes two fields:The trailing icon is hardcoded inside
_RemixSelectTriggerWidgetatpackages/remix/lib/src/components/select/select_widget.dart:351-356:Additionally, both the leading icon (line 348) and the trailing icon (line 351) share the same
spec.iconstyle slot, so even via styling there's no way to differentiate them.Proposed Solution
Add fields to
RemixSelectTriggerto override the trailing icon — likely a pair for the two states so the open/close affordance is preserved, with sensible defaults to keep this non-breaking:Add a separate
trailingIconslot toRemixSelectTriggerSpec(alongside the existingiconfor the leading slot) so each icon can be styled independently.Acceptance Criteria
RemixSelectTriggerexposes a way to override the trailing icon(s) for collapsed/expanded statesRemixSelectTriggerSpec, separate from the leading icon