setEnvironment method
setEnvironment sets environment for serving offers. 'environment' must be either 0 or 1. 0 - live environment. Default is set to 'live environment'. 1 - test environment. Returns a bool indicating that if setEnvironment call is successful or not. In case of error it can also throw exceptions. ///
Implementation
@override
Future<bool> setEnvironment(int environment) async {
try {
final statusMessage = await methodChannel.invokeMethod(
"setEnvironment",
{"environment": environment},
);
return statusMessage;
} on PlatformException catch (error) {
log(error.message as String);
rethrow;
}
}