reorder method
POST /{resource}/reorder — commits a full drag-to-reorder (P18), in the
records' new top-to-bottom order. ids are route keys
(ResourceRecord.id), first entry first — see
ResourceListProvider.saveReorder(), the only caller.
Unlike the writes above, there is no data-carrying failure outcome to
return — same contract as state/options — so a non-2xx throws
FilamentTransportException rather than degrading into a silent no-op.
Implementation
@override
Future<void> reorder(String resourceKey, List<Object> ids) async {
final response = await _transport.post('$prefix/$resourceKey/reorder', {
'order': ids,
});
// Like `state()`/`options()` and unlike the writes above: there is no
// data-carrying failure outcome to return, so a non-2xx throws rather
// than the caller mistaking a 403/404/422 for a silent no-op.
if (response.statusCode < 200 || response.statusCode >= 300) {
throw FilamentTransportException(_messageOf(response.body));
}
}