allowReassignment abstract method
Allows or disallows the reassignment of a singleton object.
This method is useful for testing purposes, as it allows you to register a mock implementation of a registered object.
It takes a single argument, allow
, which is a boolean that
indicates whether the reassignment of a singleton object is allowed.
If allow
is true, it allows the reassignment of a singleton
object. If allow
is false, it disallows the reassignment of a
singleton object.
By default, the reassignment of a singleton object is disallowed.
Implementation
void allowReassignment({required bool allow});