LogicLoader constructor

const LogicLoader({
  1. Key? key,
  2. List<LogicRef<Loadable>> refs = const <LogicRef<Loadable>>[],
  3. LoadableWidgetBuilder? builder,
  4. Widget? child,
})

Creates a LogicLoader which will call the Loadable.load method of all the LogicRefs of the given refs, when it's inserted in the tree.

refs must not be null. child and builder must not be both null.

If builder is set, child can be used as a subtree that does not depends on the loading argument.

Implementation

const LogicLoader({
  Key? key,
  this.refs = const <LogicRef<Loadable>>[],
  this.builder,
  this.child,
})  : assert(
        child != null || builder != null,
        'Either child or builder must be not null',
      ),
      super(key: key);