DataDrivenHexConfig<T> class
数据驱动的六边形生成器配置
Constructors
-
DataDrivenHexConfig({required List<
T> data, required EnhancedFreeHexWidget hexBuilder(T data, FreeHexagon hexagon, int index), HexLayoutPattern pattern = HexLayoutPattern.linear, Offset startPosition = const Offset(200, 200), double hexSize = 40.0, double hexSizeProvider(int index)?, double gap = 2.0, HexOrientation orientation = HexOrientation.flat, double bendFactor = 0.3, bool clockwise = true, String boundedDirection = 'right', Rect? bounds, int zigWidth = 3, int zigHeight = 2, int honeycombRings = 2}) -
const
Properties
- bendFactor → double
-
蛇形弯折系数(仅用于 snake 模式)
final
- boundedDirection → String
-
Bounded 生成方向('up', 'down', 'left', 'right',仅用于 snakeBounded 模式)
final
- bounds → Rect?
-
边界矩形(仅用于 snakeBounded 模式)
final
- clockwise → bool
-
生成顺序(true=顺时针,false=逆时针,仅用于 snakeBounded 模式)
final
-
data
→ List<
T> -
数据列表
final
- gap → double
-
间隙
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hexBuilder → EnhancedFreeHexWidget Function(T data, FreeHexagon hexagon, int index)
-
数据到六边形的转换器
final
- hexSize → double
-
六边形大小
final
- hexSizeProvider → double Function(int index)?
-
为每个索引提供六边形大小的函数(可选,如果提供则覆盖 hexSize)
final
- honeycombRings → int
-
蜂巢环数(仅用于 honeycomb 模式)
final
- orientation → HexOrientation
-
方向
final
- pattern → HexLayoutPattern
-
布局模式
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startPosition → Offset
-
起始位置
final
- zigHeight → int
-
Z字高度(仅用于 zigzag 模式)
final
- zigWidth → int
-
Z字宽度(仅用于 zigzag 模式)
final
Methods
-
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