TestSignalRule<C extends Cell> constructor

TestSignalRule<C extends Cell>({
  1. required TestSignalRuleType<C> rule,
  2. dynamic user,
})

Creates a signal validation rule with the given validation logic.

Parameters:

  • rule: The validation function that receives the signal and returns a boolean
    • Signature: bool Function(Signal signal, {C? cell, dynamic user})
  • user: Optional context object passed to the validation function

The rule will automatically handle type checking and exception cases.

Implementation

TestSignalRule({required TestSignalRuleType<C> super.rule, super.user}) : super();