expectNotLocked function

void expectNotLocked(
  1. WidgetTester tester,
  2. Finder finder,
  3. String name
)

Assert that a named lock is not held in a NyPage/NyState widget.

Example:

expectNotLocked(tester, find.byType(MyPage), 'submit');

Implementation

void expectNotLocked(WidgetTester tester, Finder finder, String name) {
  final state = _findNyBaseState(finder);
  expect(
    state.isLocked(name),
    isFalse,
    reason: 'Expected lock "$name" to not be held',
  );
}