GatewayConfig.fromJson constructor
Creates a GatewayConfig from a JSON map.
Implementation
factory GatewayConfig.fromJson(Map<String, dynamic> json) {
return GatewayConfig(
enabled: json['enabled'] as bool? ?? false,
port: json['port'] as int? ?? 8080,
address: json['address'] as String? ?? '0.0.0.0',
writable: json['writable'] as bool? ?? false,
enableCache: json['enableCache'] as bool? ?? true,
cacheSize: json['cacheSize'] as int? ?? 104857600,
);
}