of static method

Measure of(
  1. BuildContext context, {
  2. bool listen = true,
})

Implementation

static Measure of(BuildContext context, {bool listen = true}) {
  final scope = listen
      ? context.dependOnInheritedWidgetOfExactType<MeasureScope>()
      : context.getInheritedWidgetOfExactType<MeasureScope>();
  assert(scope != null, 'No MeasureScope found above $context.');
  return scope!.measure;
}