allowReassignment property

bool allowReassignment
getter/setter pair

If you need more than one instance of GetIt you can use asNewInstance() You should prefer to use the instance() method to access the global instance of GetIt. By default it's not allowed to register a type a second time. If you really need to you can disable the asserts by settingallowReassignment= true

Implementation

// factory StackedLocator.asNewInstance() {
//   return StackedLocator(GetIt.asNewInstance());
// }

/// By default it's not allowed to register a type a second time.
/// If you really need to you can disable the asserts by setting[allowReassignment]= true
bool allowReassignment = false;