put method

Future<void> put(
  1. String collectionID,
  2. String documentID,
  3. String jsonContents
)

Implementation

Future<void> put(
    String collectionID, String documentID, String jsonContents) {
  String fileName = "$collectionID/$documentID.json";
  Uint8List data = Uint8List.fromList(jsonContents.codeUnits);
  final Reference storageRef = storageReference.child(fileName);
  final UploadTask uploadTask = storageRef.putData(
    data,
  );
  return uploadTask;
}