update method

Future<File> update({
  1. required File file,
  2. required Media uploadMedia,
})

DriveApi.files.update wrapper that only update media(file content)

Implementation

Future<gd.File> update({
  required gd.File file,
  required gd.Media uploadMedia,
}) async {
  String debugPrefix = '$runtimeType.create()';
  try {
    lazy.log('$debugPrefix:\n${file.jsonPretty()}');
    if (file.id == null) throw ('file object has not id(null)!');
    return _driveApi.files.update(
      file,
      file.id!,
      uploadMedia: uploadMedia,
    );
  } catch (e) {
    throw ('$debugPrefix:$e');
  }
}