Contains standard libraries for ZenCode.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

InverseLiveBool.zs 288B

1234567891011121314
  1. public class InverseLiveBool {
  2. val source as LiveBool;
  3. public this(source as LiveBool) {
  4. this.source = source;
  5. }
  6. public implements LiveBool {
  7. get value => !source.value;
  8. addListener(listener)
  9. => source.addListener((oldVal, newVal) => listener(!oldVal, !newVal));
  10. }
  11. }