getSelector method

ProgrammingBlockSelectorModel? getSelector({
  1. required String key,
})

Implementation

ProgrammingBlockSelectorModel? getSelector({
  required String key,
}) {
  final auxList = (blockModel?.selectors ?? [])
      .where((element) => element.key == key)
      .toList();

  if (auxList.isEmpty) {
    return null;
  } else {
    return auxList.first;
  }
}