AccountSettings.fromJson constructor

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

Implementation

AccountSettings.fromJson(Map<String, dynamic> json) {
  // Set enabledXPC
  enabledXPC = (json['enabledXPC'] ?? false) as bool;

  // Set enabled1V1T
  enabledXPC = (json['enabled1V1T'] ?? false) as bool;

  // Set Troubleshooting
  if (json.keys.contains('troubleshooting')) {
    troubleshooting = Troubleshooting.fromJson(json['troubleshooting'] ?? {});
  }
}