DeepLinkResultCard constructor

DeepLinkResultCard({
  1. Key? key,
  2. required DeepLinkResultStatus status,
  3. Future<void> onRetry()?,
  4. String? summaryText,
  5. bool busy = false,
  6. String title = 'Link result',
  7. String dispatchedLabel = 'Link opened',
  8. String queuedLabel = 'Link will open when the app is ready',
  9. String duplicateLabel = 'Link was already handled',
  10. String rejectedLabel = 'This link is not valid',
  11. String handlerFailedLabel = 'The link could not be completed',
  12. String retryLabel = 'Try again',
  13. String actionErrorLabel = 'Action failed. Try again.',
})

Implementation

DeepLinkResultCard({
  super.key,
  required this.status,
  this.onRetry,
  this.summaryText,
  this.busy = false,
  this.title = 'Link result',
  this.dispatchedLabel = 'Link opened',
  this.queuedLabel = 'Link will open when the app is ready',
  this.duplicateLabel = 'Link was already handled',
  this.rejectedLabel = 'This link is not valid',
  this.handlerFailedLabel = 'The link could not be completed',
  this.retryLabel = 'Try again',
  this.actionErrorLabel = 'Action failed. Try again.',
}) {
  for (final (name, value) in [
    ('title', title),
    ('dispatchedLabel', dispatchedLabel),
    ('queuedLabel', queuedLabel),
    ('duplicateLabel', duplicateLabel),
    ('rejectedLabel', rejectedLabel),
    ('handlerFailedLabel', handlerFailedLabel),
    ('retryLabel', retryLabel),
    ('actionErrorLabel', actionErrorLabel),
    ('summaryText', summaryText),
  ]) {
    if (value != null && value.trim().isEmpty) {
      throw ArgumentError.value(value, name, 'must not be blank');
    }
  }
}