tryCastToListObj method

List<Object>? tryCastToListObj()

Implementation

List<Object>? tryCastToListObj() {
  if (this == null) {
    return null;
  }
  if (!(this is ListJsonObject)) {
    return null;
  }
  return (this as ListJsonObject)
      .value
      .where((element) => element != null)
      .map((e) => e!)
      .toList();
}