Skip to content

New custom insta delegate #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 30, 2022

Conversation

LeGoffMael
Copy link
Collaborator

@LeGoffMael LeGoffMael commented Dec 29, 2022

As we discussed previously #399.
Introduce InstaAssetPickerBuilder based on insta_assets_picker which reproduces instagram layout.

This custom delegate show how to:

  • setup a complete different: layout, select and view logic
  • use keepScrollOffset when set to true to restore scroll and preview
  • customize DefaultAssetPickerViewerBuilderDelegate (currently there is no example for it)

Tested on both iOS and Android.

Changes needed outside of example folder

  • Fixed an issue in AssetPickerViewer, when not used in a new pushed route, initStateAndTicker would be omitted.

Record

RPReplay_Final1672293966-3.mov

@AlexV525
Copy link
Member

I run the example with the new delegate and delete the didUpdateWidget in the state, nothing happened as I observed. So what's the first issue with the builder exactly?

@LeGoffMael
Copy link
Collaborator Author

I run the example with the new delegate and delete the didUpdateWidget in the state, nothing happened as I observed. So what's the first issue with the builder exactly?

Here i recorded my screen while reproducing the error. Basically when the InstaAssetPickerViewerBuilder is updated to show a different asset or from a scroll action for example, the error occur.

Screen.Recording.2022-12-30.at.2.26.45.PM.mov

@AlexV525
Copy link
Member

I've split the initAnimations for the delegate, please try again to see if exceptions were thrown. 😄

@LeGoffMael
Copy link
Collaborator Author

I've split the initAnimations for the delegate, please try again to see if exceptions were thrown. 😄

The exception seems to be gone! Thank you

Copy link
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

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

LGTM. Although I do found some strange behavior when scrolling the picker, but I think I'll try to update them and submit issues to your picker if possible.

@AlexV525 AlexV525 merged commit 72b29dc into fluttercandies:main Dec 30, 2022
@LeGoffMael
Copy link
Collaborator Author

LGTM. Although I do found some strange behavior when scrolling the picker, but I think I'll try to update them and submit issues to your picker if possible.

Great! Sure, if you find any issue let me know via the insta_assets_picker repository, i will try to fix it there and apply it in the delegate example as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants