StatsResponse.fromJson constructor
StatsResponse.fromJson(
- Map json_
Implementation
StatsResponse.fromJson(core.Map json_)
: this(
avgSessionLengthMinutes:
json_.containsKey('avg_session_length_minutes')
? (json_['avg_session_length_minutes'] as core.num).toDouble()
: null,
churnProbability: json_.containsKey('churn_probability')
? (json_['churn_probability'] as core.num).toDouble()
: null,
daysSinceLastPlayed: json_.containsKey('days_since_last_played')
? json_['days_since_last_played'] as core.int
: null,
highSpenderProbability: json_.containsKey('high_spender_probability')
? (json_['high_spender_probability'] as core.num).toDouble()
: null,
kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
numPurchases: json_.containsKey('num_purchases')
? json_['num_purchases'] as core.int
: null,
numSessions: json_.containsKey('num_sessions')
? json_['num_sessions'] as core.int
: null,
numSessionsPercentile: json_.containsKey('num_sessions_percentile')
? (json_['num_sessions_percentile'] as core.num).toDouble()
: null,
spendPercentile: json_.containsKey('spend_percentile')
? (json_['spend_percentile'] as core.num).toDouble()
: null,
spendProbability: json_.containsKey('spend_probability')
? (json_['spend_probability'] as core.num).toDouble()
: null,
totalSpendNext28Days: json_.containsKey('total_spend_next_28_days')
? (json_['total_spend_next_28_days'] as core.num).toDouble()
: null,
);