For use with https://github.com/mobyinc/MobyLog
- Add package
- As early as possible, call init with the server endpoint
MobyLog().init('https://my-logging-server', http.Client());
- To switch off actual logging, call
MobyLog().switchOff()
right after init - Set user once known
MobyLog.setUser(userIdentifier)
- Track screens and events
MobyLog().screen('home');
MobyLog().event('logout');
info
argument may be any string value
data
may be any Map data serializable to JSON
MobyLog().event('toggle', info: 'primary', data: { 'status': 'on' });