fix(favoritos): use the cross-version onReorder API and correct drag index math
Build & Deploy PluriWave / Análisis de código (push) Successful in 24s
Build & Deploy PluriWave / Build APK + AAB release (push) Successful in 2m26s

The CI Flutter SDK predates v3.41 and only exposes ReorderableListView's
onReorder; the newer onReorderItem broke the build with three analyzer
errors. onReorder exists in both SDKs, so use it and compensate for its
pre-removal newIndex internally.

Fixing the call site surfaced a real ordering bug: _onReorder located the
target neighbour in the untrimmed global list, while ServicioFavoritos
.reordenar inserts into the list after the station is removed. Dragging a
station downwards past its neighbours therefore landed it one slot too far.
Adds a mid-list downward-drag test, the only case that separates the two
coordinate spaces.
This commit is contained in:
2026-07-29 18:35:08 +02:00
parent 40c2763061
commit c01c518541
3 changed files with 61 additions and 12 deletions
+2 -2
View File
@@ -44,8 +44,8 @@ void main() {
for (final locale in _auditedLocales) {
final arb = readArb(locale);
for (final key in realKeys(arb)) {
if (!es.containsKey(key))
continue; // arb_parity_test's job, not this one's
// Missing keys are arb_parity_test's job, not this one's.
if (!es.containsKey(key)) continue;
if (arb[key] == es[key] &&
!identicalValueAllowlist.contains((locale, key))) {
unlisted.add('$locale/$key = "${arb[key]}"');