recreateController method

C recreateController(
  1. C oldController
)

A builder that recreates a controller from an old controller.

By default, it calls the controllerRebuilder callback or, if not defined, it calls the controllerBuilder. Can be overridden in a descendant for custom implementation.

Implementation

C recreateController(C oldController) => (controllerRebuilder != null)
    ? controllerRebuilder!.call(oldController)
    : controllerBuilder(oldController.value);