Fix modifier ordering and interpolation endpoints
- Dominant language
- Dart
- Stars
- 800
- Forks
- 49
- Avg merge
- 3h 39m
- Merged PRs (30d)
- 22
Description
## Problem
Two correctness problems affect widget modifiers:
1. `MixScope.orderOfModifiers` is publicly exposed, inherited, and tracked as a `modifierOrder` aspect, but normal `WidgetModifierConfig.resolve(context)` does not read it. As a result, configuring modifier order at the scope has no effect on rendering.
2. `ModifierListTween` iterates only the target list. It removes begin-only modifiers immediately and, for target-only modifiers without a neutral default, can include the modifier at `t = 0` but omit it at `t = 1`. Animated results therefore fail to reach the requested endpoint.
## Expected behavior
Modifier ordering should use this precedence:
```
style-local WidgetModifierConfig order
> nearest MixScope modifier order
> package default order
> remaining configured types in stable order
```
`ModifierListTween` must satisfy `lerp(0) == begin` and `lerp(1) == end` for every membership case. For modifiers present on only one side, interpolate through a genuine neutral modifier where one exists; otherwise snap in or out at the documented midpoint in the correct direction.
## Acceptance criteria
- `MixScope.orderOfModifiers` changes normal style-widget rendering.
- Style-local modifier order overrides the inherited scope order.
- Modifier-order dependencies subscribe precisely to the `modifierOrder` aspect.
- Tween endpoints exactly match the requested begin and end lists.
- Additions and removals animate correctly both with and without neutral defaults.
- Reset modifiers remain filtered and never reach rendering or interpolation.
- Regression coverage includes resolved modifier order, rendered wrapper nesting, and the interpolation membership matrix.
Contributor guide
No contributing guide indexed for this repository
Research direction
Trace MixScope.orderOfModifiers into WidgetModifierConfig.resolve(context), then inspect ModifierListTween and the existing modifier regression tests. Verify scope and style-local ordering, precise modifierOrder dependencies, wrapper nesting, endpoint equality, membership cases with and without neutral defaults, and filtering of reset modifiers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100