MethodHandler
Like a Handler
, except it calls an unbound method that must be later bound.
Example:
class MyWidget: StatelessWidget, HashableWidget {
func onClick() {}
static let onClickHandler = MethodHandler(onClick)
...
func build(ctx: BuildContext) -> Widget {
return Button(
Button.onClick => MyWidget.onClickHandler.bind(to: self)
)
}
}