Skip to content

Conversation

@dipakp2726
Copy link
Contributor

Description

in shareXfile if sharedFile doesn't contain path
then make new file in TemporaryDirectory and return with path

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?
not sure about this.

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • [] No, this is not a breaking change.

…romData()

if file doesn't contain path
then make new file in TemporaryDirectory and return with path
@dipakp2726
Copy link
Contributor Author

melos run format gives this error

Unable to run "clang-format". Make sure that it is in your path, or provide a full path with --clang-format.

@dipakp2726 dipakp2726 changed the title fix : Share.shareXFiles doesn't work if XFile is created using File.f… fix: Share.shareXFiles doesn't work if XFile is created using File.f… Oct 22, 2022
@dipakp2726
Copy link
Contributor Author

one of test is failing as sharing empty file no longer throws assertion error

@dipakp2726 dipakp2726 changed the title fix: Share.shareXFiles doesn't work if XFile is created using File.f… fix: share XFile created using File.fromData() Oct 22, 2022
@miquelbeltran
Copy link
Member

Tentative looking good for me, I need to try this on my PC in the coming days tho.

But, in order to approve a merge, you will need to provide a unit test or integration test at least showing this (e.g. call to shareXFile with a file created using fromData) and all failing tests should be fixed (or removed if no longer relevant)

@miquelbeltran miquelbeltran changed the title fix: share XFile created using File.fromData() fix(share_plus): share XFile created using File.fromData() Oct 23, 2022
Copy link
Member

@miquelbeltran miquelbeltran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This works great!

@miquelbeltran miquelbeltran added Hacktoberfest Issues taking part in Hacktoberfest hacktoberfest-accepted labels Oct 24, 2022
@miquelbeltran
Copy link
Member

Let's wait for the integration tests to finish, and we can merge

@miquelbeltran miquelbeltran changed the title fix(share_plus): share XFile created using File.fromData() feat(share_plus): share XFile created using File.fromData() Oct 24, 2022
@miquelbeltran
Copy link
Member

Seems that emulator with API 32 not having a day today, but the other API levels passed and the error is unrelated, so giving it a go

@miquelbeltran miquelbeltran merged commit 4ce5575 into fluttercommunity:main Oct 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Hacktoberfest Issues taking part in Hacktoberfest hacktoberfest-accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Share.shareXFiles doesn't work if XFile is created using File.fromData()

2 participants