clientOf static method

FeedbackClient clientOf(
  1. BuildContext context
)

Accesses current FeedbackClient instance.

Implementation

static FeedbackClient clientOf(BuildContext context) {
  final scope = context.getInheritedWidgetOfExactType<CupThreadThemeScope>() ??
      context.dependOnInheritedWidgetOfExactType<CupThreadThemeScope>();
  assert(scope != null, 'No CupThreadTheme found in widget tree');
  return scope!.client;
}