RxBuilder constructor

RxBuilder({
  1. Key? key,
  2. required Widget builder(
    1. BuildContext context
    ),
  3. bool filter()?,
})

Listen for RxNotifier changes present in the builder method.
builder: All RxNotifier used in this function will be automatically signed and this function will be called every time the value of an RxNotifier changes. filter: Filter reactions and prevent unwanted effects.

Widget build(BuildContext context){
    return RxBuilder(
        builder: (_) => Text('${counter.value}'),
    );
}

Implementation

RxBuilder({
  Key? key,
  required this.builder,
  bool Function()? filter,
}) : super(key: key) {
  _filter = filter;
  _stackTrace = StackTrace.current;
}