getSubject method
Called internally from Renderer widget only to subscribe
to _rendererSubject
and start receiving new relative UI States
Declare the consumer
class as an argument to protect the function
against general use.
This getter will throw an exception if the provided consumer
is not of
Renderer type.
Implementation
PublishSubject? getSubject(Object consumer) {
if (consumer is! Renderer) {
throw 'Illegal action:: Consuming getSubject() inside ${consumer.runtimeType} is forbidden.'
' If you\'re trying to add a state use notifyRenderers() instead';
}
return _rendererSubject;
}