BackgroundConfig.fromJson constructor

BackgroundConfig.fromJson(
  1. Map<String, dynamic> json
)

Creates a BackgroundConfig from a JSON map.

Implementation

factory BackgroundConfig.fromJson(Map<String, dynamic> json) {
  return BackgroundConfig(
    type: json['type'] as String? ?? 'solid',
    style: json['style'] as String?,
    color: json['color'] as String? ?? '#FFFFFF',
    opacity: (json['opacity'] as num?)?.toDouble() ?? 1.0,
    blurRadius: (json['blurRadius'] as num?)?.toDouble(),
  );
}