any_call 1.0.0 copy "any_call: ^1.0.0" to clipboard
any_call: ^1.0.0 copied to clipboard

AnyCall, invoke with variant arguments.

AnyCall, invoke with variant arguments. #

Usage #

dynamic a = AnyCall<void>(
  callback: (ls, map) {
    print("callback: $ls, $map ");
  },
);

a(1, 2, 3, $name: "yang", pos: 100);
//output:  callback: [1, 2, 3], {$name: yang, pos: 100}
dynamic b = AnyCall<String>(
  callback: (ls, map) {
    return "callback: $ls, $map ";
  },
  before: (ls, map) {
    print("before");
  },
  after: (s) {
    print("after: $s");
  },
);

String s = b(1, 2, 3, name: "yang", pos: 100);
print(s);

//outputs:
// before
// after: callback: [1, 2, 3], {name: yang, pos: 100} 
// callback: [1, 2, 3], {name: yang, pos: 100}
0
likes
130
points
105
downloads

Publisher

unverified uploader

Weekly Downloads

AnyCall, invoke with variant arguments.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on any_call