consume method

Widget consume(
  1. Widget create(), {
  2. Key? key,
})

A helper function to touch() itself first and then globalConsume.

Implementation

Widget consume(Widget Function() create, {Key? key}) {
  final wrapFn = () {
    touch();
    return create();
  };
  return globalConsume(wrapFn, key: key);
}