caller_info 0.0.6 copy "caller_info: ^0.0.6" to clipboard
caller_info: ^0.0.6 copied to clipboard

outdatedDart 1 only

Caller info (caller, closure, frame, line, method, source, type).

example/example.dart

import 'package:caller_info/caller_info.dart';

void main() {
  printInfo(new CallerInfo());
  Foo.test();
  new Foo().testClosure();
}

class Foo {
  static void test() {
    printInfo(new CallerInfo());
  }

  void testClosure() {
    (() => printInfo(new CallerInfo()))();
  }
}

void printInfo(CallerInfo ci) {
  print("======= Caller info =======");
  print("frame: ${ci.frame}");
  print("source: ${ci.source}");
  print("line: ${ci.line}");
  print("caller: ${ci.caller}");
  print("type: ${ci.type}");
  print("method: ${ci.method}");
  print("closure: ${ci.closure}");
}
0
likes
0
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

Caller info (caller, closure, frame, line, method, source, type).

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on caller_info