Skip to content
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

How can I implement tutorial Coach Mark over several Widgets? #69

Closed
corusm opened this issue May 9, 2021 · 6 comments
Closed

How can I implement tutorial Coach Mark over several Widgets? #69

corusm opened this issue May 9, 2021 · 6 comments

Comments

@corusm
Copy link

corusm commented May 9, 2021

I have multiple Stateless and Statefull widgets. I wan't to make the tutorial Coach with one button over multiple Files.
Is there a way to pass the Globalkeys oder is there another Method?

@RafaelBarbosatec
Copy link
Owner

Hi @corusm !
In the moment is not possible to focus in multiple targets.
If it's available, and want to contribute a PR by adding this new feature, it would be great!

@SalahAdDin
Copy link

SalahAdDin commented Jun 14, 2021

Hi @corusm !
In the moment is not possible to focus in multiple targets.
If it's available, and want to contribute a PR by adding this new feature, it would be great!

I thought it could be possible since the GlobalKey is a value across multiple widgets, may am i wrong?

Something like this (which is also related to a tutorial): https://flutteragency.com/how-can-multiple-widgets-uses-the-same-global-key-in-flutter/

I tried to use it but i got "TutorialCoachMark (ERROR): It was not possible to obtain target position." error.

@desmeit
Copy link

desmeit commented Nov 16, 2022

@SalahAdDin
for me this is working, thanks.

Edit: after several more tests, unfortunately, it is not possible to do it this way. I always get "duplicate Global Key".

@kutsarenko
Copy link

@SalahAdDin for me this is working, thanks.

Edit: after several more tests, unfortunately, it is not possible to do it this way. I always get "duplicate Global Key".

I get the same error. Do you have any update with the issue?

@SalahAdDin
Copy link

@SalahAdDin for me this is working, thanks.
Edit: After several more tests, unfortunately, it is not possible to do it this way. I always get "duplicate Global Key".

I get the same error. Do you have any updates on the issue?

No idea about it.

@CengizhanParlak
Copy link

I had this issue too, the problem was, I was adding GlobalKey to a list element, which then created like 100 more. All I needed to do was ensure the only first element of the list gets the key. Like:

ListView.builder(
...
    key: index == 0 ? keyButton1 : null,
...
),

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

No branches or pull requests

6 participants