mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Break the 372-line frontend API client into focused files under lib/utils/api/: error mapping (api_error.dart), Dio setup behind a buildDio factory (dio_config.dart), and device/scanner/notification endpoints as extensions in part files. Collapse the five near-identical scanner-status methods via a generic _getModel helper and de-duplicate the pagination logic via a shared _paginate helper. The BackendAPI singleton and dioErrorToUserMessage remain importable from oott_api.dart unchanged, so no call sites are affected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>