debugResetId static method

  1. @visibleForTesting
void debugResetId(
  1. {int to = 1}
)

Resets the internal ID counter for testing purposes.

This call has no effect when asserts are disabled. Calling it from application code will likely break text input for the application.

Implementation

@visibleForTesting
static void debugResetId({int to = 1}) {
  assert(() {
    _nextId = to;
    return true;
  }());
}