ChangeEmitterProvider<S extends ChangeEmitter<Change>> constructor

ChangeEmitterProvider<S extends ChangeEmitter<Change>>(
  1. {Key key,
  2. @required Create<S> create,
  3. bool lazy,
  4. Widget child}
)

Implementation

ChangeEmitterProvider({
  Key key,
  @required Create<S> create,
  bool lazy,
  Widget child,
}) : super(
        key: key,
        create: (BuildContext context) {
          var emitter = create(context);
          if (emitter is ParentEmitter)
            (emitter as ParentEmitter).registerChildren();
          return emitter;
        },
        dispose: (context, S element) => element.dispose(),
        lazy: lazy,
        child: child,
        startListening: _startListening,
      );