callMeOnTaken method

  1. @override
void callMeOnTaken(
  1. void request(
    1. Box oldBox,
    2. Box newBox
    )
)
override

request is a function that takes two arguments, the old box and the new box.

You can add as many requests as you like, they would be called after box being changed by the order of adding.

Implementation

@override
void callMeOnTaken(void Function(Box oldBox, Box newBox) request) =>
    throw BreakingVowException();