Created
April 15, 2022 15:49
-
-
Save saliouseck2009/9d7cc5275e5534a912f245e15a066202 to your computer and use it in GitHub Desktop.
Flutter : Create VoidCallBack with args
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef Int2VoidFunc = void Function(int); | |
// or: typedef void Int2VoidFunc(int arg); | |
class MyOtherClass { | |
final Int2VoidFunc callback; | |
MyOtherClass(this.callback); | |
void callCallaback() { callback(5); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment