read<T> method
T
will find an instance saved under that class in the environment. Will
throw an error if none can be found.
Implementation
@override
T read<T>({bool allowUninitialized = false}) {
if (!initialized && !allowUninitialized) {
throw ArgumentError(
'This test environment must be initialized before it is used!',
);
}
return _initializedMap[T] as T;
}