matchesPreviousStepTriggerOptionValues method
bool
matchesPreviousStepTriggerOptionValues(
- List? previousStepTriggerOptionValues,
- String completedDocKey,
- String? completedSelectedOptionId
)
Implementation
bool matchesPreviousStepTriggerOptionValues(
List<dynamic>? previousStepTriggerOptionValues,
String completedDocKey,
String? completedSelectedOptionId,
) {
if (previousStepTriggerOptionValues == null ||
previousStepTriggerOptionValues.isEmpty) {
return true;
}
final selectedId = completedSelectedOptionId ?? '';
final trigger = '$completedDocKey::$selectedId';
for (final item in previousStepTriggerOptionValues) {
if (item is String && item == trigger) {
return true;
}
}
return false;
}