beginChainedDocument method

void beginChainedDocument(
  1. Map<String, dynamic> document
)

Implementation

void beginChainedDocument(Map<String, dynamic> document) {
  final normalizedDocument = Map<String, dynamic>.from(document);
  _activeChainedDocument = normalizedDocument;
  _selectedCustomDocument = normalizedDocument;
  _selectedChainedDocumentOption = null;
  _documentType = normalizedDocument['key'] as String?;

  if (_documentCountry == null &&
      shouldSkipCountryStepForCustomDocument(normalizedDocument)) {
    _documentCountry = '';
  }

  if (!_chainedDocIntroShown && hasChainedDocIntroContent()) {
    goToStep(DataleonFlowStep.chainedDocumentIntro);
  } else {
    goToStep(DataleonFlowStep.chainedCustomDocument);
  }
  notifyListeners();
}