Skip to content

Creating a Callback from widgetNext #4

@iCarvalho7

Description

@iCarvalho7

Hey, I has detected an improvement using this library, when user click in widgetNext i want to execute a function.

1 - Create a param in "TutorialItens" called "nextCallback".

Code(tutorial_itens.dart):

final Function? nextCallback;
this.nextCallback,

2 - In onTap function of GestureDetector:

Code(tutorial_tutorial.dart):

if(element.nextCallback != null) element.nextCallback?.call();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions