of static method

TwConfig of(
  1. BuildContext context
)

Get the current TwConfig from the widget tree

Implementation

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