of static method

  1. @useResult
FButtonData of(
  1. BuildContext context
)

Returns the FButtonData of the FButton in the given context.

Contract

Throws AssertionError if there is no ancestor FButton in the given context.

Implementation

@useResult
static FButtonData of(BuildContext context) {
  final data = context.dependOnInheritedWidgetOfExactType<FButtonData>();
  assert(data != null, 'No FButtonData found in context');
  return data!;
}