isTrue method
Handle a message if the given predicate
returns true
.
Implementation
ActorBuilder isTrue(bool Function(Object? message) predicate, Actor actor) {
_conditions.add(
_Condition(
(ctx, msg) => predicate(msg),
actor,
),
);
return this;
}