addMaskEntryForTesting static method

  1. @visibleForTesting
void addMaskEntryForTesting(
  1. String id,
  2. GlobalKey<State<StatefulWidget>> key,
  3. bool isMasked()
)

Registers a raw registry entry. Only a real MaskedWidget does this in production; tests use it to inject an entry that misbehaves (a throwing isMasked, a key that never mounts) and assert one bad entry cannot cost the frame its other masks.

Implementation

@visibleForTesting
static void addMaskEntryForTesting(
  String id,
  GlobalKey key,
  bool Function() isMasked,
) =>
    _MaskRegistry.instance.add(id, key, isMasked);