getOrder method
Get order by purchase number
This function sends a request to the API client to get an order by purchase number. If the request is successful, it returns a list of qr codes. In case of an error, the error is recorded in Crashlytics and the error is rethrown.
Returns a Future<Order> containing an order detail.
Throws an error if the request fails for any reason.
Implementation
Future<Order> getOrder(String purchaseNumber) =>
_apiClient.getOrder(purchaseNumber).catchError((error) async {
unawaited(_crashlytics?.recordError(error, StackTrace.current));
throw error;
});