OverlayConfig.fromMap constructor

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

Creates an OverlayConfig from a map.

Implementation

factory OverlayConfig.fromMap(Map<String, dynamic> map) {
  return OverlayConfig(
    autoShow: map['autoShow'] ?? true,
    autoHideDuration: map['autoHideDuration'] ?? 3000,
    enableVibration: map['enableVibration'] ?? false,
    bubbleColor: map['bubbleColor'],
    bubbleSize: map['bubbleSize']?.toDouble() ?? 56.0,
    bubbleOpacity: map['bubbleOpacity']?.toDouble() ?? 0.9,
    enableSpellCheck: map['enableSpellCheck'] ?? true,
    enableGrammarCheck: map['enableGrammarCheck'] ?? true,
    initialX: map['initialX'] ?? 100,
    initialY: map['initialY'] ?? 200,
  );
}