setConfig method

Future<Either<ScreenMeetError, bool>> setConfig(
  1. ScreenMeetConfig config
)

Sets initial configuration for the ScreenMeet SDK

Implementation

Future<Either<ScreenMeetError, bool>> setConfig(ScreenMeetConfig config) async {
  var configMap = <String, dynamic> {
    _pm.kOrganizationKey: config.organizationKey,
    _pm.kEndpoint: config.endpoint,
    _pm.kCollectMetrics: config.collectMetric,
    _pm.kLogLevel: config.loggingLevel
  };

  final Map result = await _channel.invokeMethod(_pm.kSetConfigCommand, configMap);
  if (_pm.isSuccess(result)) { return Right(true);}
  return Left(_pm.error(result));
}