FieldPath.from constructor

FieldPath.from(
  1. Object? object
)

Implementation

factory FieldPath.from(Object? object) {
  if (object is String) {
    return FieldPath.fromArgument(FieldMask.field(object));
  } else if (object is FieldPath) {
    return object;
  }

  throw ArgumentError.value(
    object,
    'object',
    'must be a String or FieldPath.',
  );
}