listen method Null safety

Widget listen(
  1. void listener(
    1. BuildContext context,
    2. TCubit cubix
    ),
  2. Widget child,
  3. {Object? family,
  4. bool transient = false}
)

Implementation

Widget listen(
  void Function(BuildContext context, TCubit cubix) listener,
  Widget child, {
  Object? family,

  /// remove cubix automatically when the widget is disposed
  bool transient = false,
}) {
  return CubixListener<TCubit>(
    create: this,
    listener: listener,
    child: child,
    family: family,
    transient: transient,
  );
}