add method

  1. @override
String add(
  1. StateXController? controller
)
override

Add a specific StateXController to this View. Returns the StateXController's unique String identifier.

Implementation

@override
String add(StateXController? controller) {
  if (controller != null) {
    /// It may have been a listener. Can't be both.
    removeListener(controller);

    // todo: Delete this along with _controllers. Proven hazardous.
    /// Collect all the Controllers to the 'root' State object;
    rootState?._controllers.add(controller);
  }
  return super.add(controller);
}