strategy property

BootstrapStrategy? strategy

The bootstrap behavior for controllers if lazy is true.

lazyFirstBuild

(default). Bootstrap will be called on first MomentumBuilder usage of a controller.

lazyFirstCall

Bootstrap will be called on first Momentum.controller<T>(context) call.

var someController = Momentum.controller<SomeController>(context); // will bootstrap.

// in other widget ...
var someController = Momentum.controller<SomeController>(context); // will NOT bootstrap.

Implementation

BootstrapStrategy? get strategy => _strategy;