adapted to current Dart + use the stack_trace package for getting the caller information