ref_out_box 1.0.1 copy "ref_out_box: ^1.0.1" to clipboard
ref_out_box: ^1.0.1 copied to clipboard

outdated

Wrapping values so that they can be passed by reference, like c#'s ref out

pub MIT


Wrapping values so that they can be passed by reference, like c#'s ref out

Example #

void tryDoSome(Out<bool> out) {
  trySetVal(out, true);
}
final out = Out<bool>();

tryDoSome(out);

out.val // true

void addRef(Ref<int> ref) {
  tryChangeVal(ref, (val) => val++);
}
final ref = Ref(1);

addRef(ref);
addRef(ref);

ref.val // 3
1
likes
40
pub points
56%
popularity

Publisher

unverified uploader

Wrapping values so that they can be passed by reference, like c#'s ref out

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

some

More

Packages that depend on ref_out_box