createGridlineStyle method

  1. @override
LineStyle createGridlineStyle(
  1. GraphicsFactory graphicsFactory,
  2. LineStyleSpec? spec
)

Creates LineStyle for axis gridlines from spec.

Fill missing value(s) with default.

Implementation

@override
LineStyle createGridlineStyle(
  GraphicsFactory graphicsFactory,
  LineStyleSpec? spec,
) =>
    graphicsFactory.createLinePaint()
      ..color = spec?.color ?? MaterialPalette.gray.shade300
      ..dashPattern = spec?.dashPattern
      ..strokeWidth = spec?.thickness ?? 1;