of static method

confirm the passed context contains BSRowInheritance, and if there is one, or more pass the nearest BSRowInheritance in the Widget tree use this function to access BSRowInheritance's data

Implementation

static BSRowInheritance of(BuildContext context) {
  final BSRowInheritance? result =
      context.dependOnInheritedWidgetOfExactType<BSRowInheritance>();
  assert(result != null, 'No BSRowInheritance found in context');
  return result!;
}