app_event

Last updated:

0 purchases

app_event Image
app_event Images
Add to Cart

Description:

app event

app_event #
App event help manage events easily without using stream. You can manage the event by simply adding it to the required class.

Usage #
1. Create Receiver #

Implement AppEventInterface you want to use

class Receiver implements AppEventInterface{
@override
onEventReceived(String eventName, value) {
if(eventName == "testEvent"){
//todo: update by event
}
}
}
copied to clipboard
2. Register Event #

Register your event name with your class implemented AppEventInterface

AppEvent.register("testEvent", Model);
copied to clipboard
3. Dispatch Event #

Dispatch your event When you want

AppEvent.dispatch("testEvent");
copied to clipboard
4. Receive Event #

There's nothing else you need to do.
All pre-made onEventReceived functions are executed automatically.

@override
onEventReceived(String eventName, value) {
if(eventName == "testEvent"){
//todo: update by event
}
}
copied to clipboard
5. Unregister Event #

When you no longer use the event, unregister event

AppEvent.unRegister("testEvent");
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.