HexCell class

单个六边形单元格

Constructors

HexCell({required HexCoordinate coordinate, Color? fillColor, Color? borderColor, double? borderWidth, bool enabled = true, Map<String, dynamic> data = const {}, bool isSelected = false, bool isOccupied = false})
const
HexCell.fromOffsetFlat(int col, int row)
从偏移坐标创建单元格(平顶朝上)
factory
HexCell.fromOffsetPointy(int col, int row)
从偏移坐标创建单元格(尖顶朝上)
factory
HexCell.simple(HexCoordinate coordinate)
创建一个简单的单元格
factory

Properties

borderColor Color?
单元格的边框颜色
final
borderWidth double?
单元格的边框宽度
final
coordinate HexCoordinate
六边形坐标
final
data Map<String, dynamic>
单元格的自定义数据
final
enabled bool
单元格是否可交互
final
fillColor Color?
单元格的填充颜色
final
hashCode int
The hash code for this object.
no setteroverride
isOccupied bool
是否被占用(被 widget 占用)
final
isSelected bool
是否被选中
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({HexCoordinate? coordinate, Color? fillColor, Color? borderColor, double? borderWidth, bool? enabled, Map<String, dynamic>? data, bool? isSelected, bool? isOccupied}) HexCell
复制并修改单元格属性
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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