toData method Null safety

FieldData toData(
  1. String collectionId
)

Implementation

FieldData toData(String collectionId) => FieldData(
      id: "",
      name: name,
      type: FieldType.text,
      system: false,
      required: !$nullable,
      unique: true,
      collectionId: collectionId,
    );