findById method

ISapObject? findById(
  1. String id, {
  2. bool raise = true,
})

Implementation

ISapObject? findById(String id, {bool raise = true}) {
  final childObj = obj.findById(id);
  if (childObj == null) {
    if (raise) throw Exception("Element with ID '$id' not found.");
    return null;
  }
  return childObj;
}