PointConnectionStyle.fromMap constructor

PointConnectionStyle.fromMap(
  1. Map<String, dynamic> map
)

Creates a PointConnectionStyle object from a map.

The map parameter is a map representation of the PointConnectionStyle object.

Implementation

factory PointConnectionStyle.fromMap(Map<String, dynamic> map) {
  return PointConnectionStyle(
    type: PointConnectionType.values.byName(map['type']),
    dotSize: map['dotSize'] as double,
    spacing: map['spacing'] as double,
    dashSize: map['dashSize'] as double,
    lineWidth: map['lineWidth'] as double,
    color: Color(map['color'] as int),
    dashAnimateTime: map['dashAnimateTime'] as int? ?? 0,
    transitionDuration: map['transitionDuration'] as int? ?? 500,
    animateOnAdd: map['animateOnAdd'] as bool? ?? true,
    growthAnimationDuration: map['growthAnimationDuration'] as int? ?? 1000,
  );
}