setupPathFinding method

void setupPathFinding({
  1. bool? linePathEnabled,
  2. Color? pathLineColor,
  3. Color? barriersCalculatedColor,
  4. double pathLineStrokeWidth = 4,
  5. bool showBarriersCalculated = false,
  6. bool useOnlyVisibleBarriers = true,
  7. bool gridSizeIsCollisionSize = false,
  8. double factorInflateFindArea = 2,
})

Implementation

void setupPathFinding({
  bool? linePathEnabled,

  /// Use to set line path color
  Color? pathLineColor,
  Color? barriersCalculatedColor,

  /// Use to set line path width
  double pathLineStrokeWidth = 4,

  /// Use to debug and show area collision calculated
  bool showBarriersCalculated = false,
  bool useOnlyVisibleBarriers = true,

  /// If `false` the algorithm use map tile size with base of the grid. if true this use collision size of the component.
  bool gridSizeIsCollisionSize = false,
  double factorInflateFindArea = 2,
}) {
  _linePathEnabled = linePathEnabled ?? _linePathEnabled;
  _useOnlyVisibleBarriers = useOnlyVisibleBarriers;
  _factorInflateFindArea = factorInflateFindArea;
  _paintShowBarriers.color =
      barriersCalculatedColor ?? const Color(0xFF2196F3).withOpacity(0.5);
  _showBarriers = showBarriersCalculated;

  _pathLineColor = pathLineColor ?? _pathLineColor;
  _pathLineStrokeWidth = pathLineStrokeWidth;
  _pathLineColor = pathLineColor ?? const Color(0xFF40C4FF).withOpacity(0.5);
  _gridSizeIsCollisionSize = gridSizeIsCollisionSize;
}