create method

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

DriveApi.files.create wrapper that create file with media(file content)

Implementation

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