maybeOf static method

ChartStyle? maybeOf(
  1. BuildContext context
)

Returns the ChartStyle most closely associated with the given context, and returns null if there is no ChartStyle associated with the given context.

Implementation

static ChartStyle? maybeOf(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<ChartStyle>();
}