jsonVariation method
Implementation
@Deprecated("use objectVariation(featureId, defaultValue) instead")
Future<Map<String, dynamic>> jsonVariation(
String featureId, {
required Map<String, dynamic> defaultValue,
}) async {
return valueGuard<Map<String, dynamic>>(
await _invokeMethod(
CallMethods.jsonVariation.name,
argument: {
CallMethodParams.featureId: featureId,
CallMethodParams.defaultValue: defaultValue,
},
),
customMapping: (response) {
return response;
},
).onError((error, stackTrace) {
debugPrint("get jsonVariation fail: ${error?.toString()}");
return defaultValue;
});
}