HexGridConfig class

六边形网格配置

Constructors

HexGridConfig({required int columns, required int rows, required double hexSize, HexOrientation orientation = HexOrientation.flat, bool showGridLines = true, Color gridLineColor = Colors.grey, double gridLineWidth = 1.0, Color? fillColor, double spacing = 0.0, bool enableInteraction = true})
const
HexGridConfig.defaultConfig({required Size containerSize, int columns = 4, int rows = 4, HexOrientation orientation = HexOrientation.flat})
创建默认配置
factory

Properties

columns int
网格的列数
final
enableInteraction bool
是否启用交互(点击、拖拽等)
final
fillColor Color?
六边形填充颜色
final
gridLineColor Color
网格线颜色
final
gridLineWidth double
网格线宽度
final
hashCode int
The hash code for this object.
no setterinherited
hexSize double
单个六边形的尺寸(半径)
final
orientation HexOrientation
六边形的方向
final
rows int
网格的行数
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showGridLines bool
网格线是否可见
final
spacing double
六边形间距
final

Methods

copyWith({int? columns, int? rows, double? hexSize, HexOrientation? orientation, bool? showGridLines, Color? gridLineColor, double? gridLineWidth, Color? fillColor, double? spacing, bool? enableInteraction}) HexGridConfig
复制并修改配置
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited