MixpanelFlagVariant.fromMap constructor
- Map map
Creates a MixpanelFlagVariant from a Map (used for platform channel deserialization).
Implementation
factory MixpanelFlagVariant.fromMap(Map<dynamic, dynamic> map) {
final key = map['key'] as String?;
if (key == null || key.isEmpty) {
developer.log(
'`MixpanelFlagVariant.fromMap` received map with missing or empty key, using empty string as default',
name: 'Mixpanel');
}
return MixpanelFlagVariant(
key: key ?? '',
value: map['value'],
experimentId: map['experimentId'] as String?,
isExperimentActive: map['isExperimentActive'] as bool?,
isQaTester: map['isQaTester'] as bool?,
);
}