expectNoToastShown function

void expectNoToastShown({
  1. String? id,
  2. String? description,
})

Assert that no toast notification was shown matching the criteria.

Implementation

void expectNoToastShown({String? id, String? description}) {
  final wasShown = NyToastRecorder.wasShown(id: id, description: description);
  expect(
    wasShown,
    isFalse,
    reason:
        'Expected no toast to be shown'
        '${id != null ? ' with id "$id"' : ''}'
        '${description != null ? ' with description "$description"' : ''}',
  );
}