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

outdatedDart 1 only

Caller info (frame, source, caller, line number)

example/example.dart

import 'package:caller_info/caller_info.dart';

void main() {
  Foo.test();
  try {
    Foo.coolMethod();
  } catch(e) {
    print(e);
  }
}

class Foo {
  static void test() {
    var ci = new CallerInfo();
    print("frame: ${ci.frame}");
    print("source: ${ci.source}");
    print("caller: ${ci.caller}");
    print("line: ${ci.line}");
  }

  static void coolMethod() {
    throw new UnimplementedError(new CallerInfo().caller);
  }
}
0
likes
0
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

Caller info (frame, source, caller, line number)

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on caller_info