SatelliteStyle.fromMap constructor
SatelliteStyle.fromMap(
- Map<String, dynamic> map
)
Implementation
factory SatelliteStyle.fromMap(Map<String, dynamic> map) {
return SatelliteStyle(
size: map['size'] as double? ?? 4.0,
color: Color(map['color'] as int? ?? 0xFFFFFFFF),
hasGlow: map['hasGlow'] as bool? ?? false,
glowColor:
map['glowColor'] != null ? Color(map['glowColor'] as int) : null,
glowIntensity: map['glowIntensity'] as double? ?? 0.5,
sizeAttenuation: map['sizeAttenuation'] as bool? ?? true,
transitionDuration: map['transitionDuration'] as int? ?? 500,
shape: SatelliteShape.values[map['shape'] as int? ?? 0],
showOrbitPath: map['showOrbitPath'] as bool? ?? false,
orbitPathColor: Color(map['orbitPathColor'] as int? ?? 0x4DFFFFFF),
orbitPathWidth: map['orbitPathWidth'] as double? ?? 1.0,
orbitPathDashed: map['orbitPathDashed'] as bool? ?? false,
);
}