PrizorSdkParams.fromJson constructor

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

Implementation

factory PrizorSdkParams.fromJson(Map<String, dynamic> json) {
  return PrizorSdkParams(
    environment: EnumHelper.fromString(Environment.values, json['environment']),
    appId: json['appId'],
    secret: json['secret'],
    appName: json['appName'],
    accentColor: Color(json['accentColor']),
    accentForegroundColor: Color(json['accentForegroundColor']),
    user: User.fromJson(json['user']),
    appLogo: Uri.tryParse(json['appLogo']),
    appBrand: Uri.tryParse(json['appBrand']),
    splashForegroundColor: Color(json['splashForegroundColor']),
    splashBackgroundColor: Color(json['splashBackgroundColor']),
    sac: Sac.fromJson(json['sac']),
    isRootRoute: json['isRootRoute'],
  );
}