allFields method

List<FieldReflection<O, dynamic>> allFields([
  1. O? obj
])

Returns a List with all fields FieldReflection.

Implementation

List<FieldReflection<O, dynamic>> allFields([O? obj]) {
  if (obj == null) {
    if (object != null) {
      return _allFieldsObjectImpl();
    } else {
      return _allFieldsNoObjectImpl();
    }
  } else if (identical(obj, object)) {
    return _allFieldsObjectImpl();
  }

  return _allFieldsNoObjectImpl().map((f) => f.withObject(obj)).toList();
}