FreeHexWidget class
自由布局六边形 Widget
Constructors
- FreeHexWidget({required String id, required FreeHexagon hexagon, required Widget child, bool clipToHexShape = false, Color? backgroundColor, Color? borderColor, double borderWidth = 1.0, bool draggable = false, VoidCallback? onTap, VoidCallback? onLongPress, VoidCallback? onDragStarted, dynamic onDragEnd(Offset newCenter)?})
-
const
Properties
- backgroundColor → Color?
-
背景颜色
final
- borderColor → Color?
-
边框颜色
final
- borderWidth → double
-
边框宽度
final
- child → Widget
-
要显示的 Widget
final
- clipToHexShape → bool
-
是否裁剪为六边形形状
final
- draggable → bool
-
是否可拖拽
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hexagon → FreeHexagon
-
六边形配置
final
- id → String
-
Widget 的唯一标识
final
- onDragEnd → dynamic Function(Offset newCenter)?
-
拖拽结束回调
final
- onDragStarted → VoidCallback?
-
拖拽开始回调
final
- onLongPress → VoidCallback?
-
长按回调
final
- onTap → VoidCallback?
-
点击回调
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? id, FreeHexagon? hexagon, Widget? child, bool? clipToHexShape, Color? backgroundColor, Color? borderColor, double? borderWidth, bool? draggable, VoidCallback? onTap, VoidCallback? onLongPress, VoidCallback? onDragStarted, dynamic onDragEnd(Offset)?}) → FreeHexWidget - 复制并修改属性
-
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.
override