call<T> method
Returns instance of FlateElementMixin which conforms to type T
Throws StateError in case when type T
is not registered
Implementation
@override
T call<T>() {
assert(_elements.containsKey(T), 'Element of type $T is not registered');
final targetElement = _elements[T];
assert(
targetElement is T,
'Registered instance of type ${targetElement.runtimeType} does not conforms to type $T',
);
return targetElement as T;
}