initZoom method

  1. @override
Future<List> initZoom(
  1. ZoomOptions options
)
override

Implementation

@override
Future<List> initZoom(ZoomOptions options) async {
  assert(options != null);

  var optionMap = new Map<String, String>();
  if (options.appKey != null) {
    optionMap.putIfAbsent("appKey", () => options.appKey!);
  }
  if (options.appSecret != null) {
    optionMap.putIfAbsent("appSecret", () => options.appSecret!);
  }
  if (options.jwtToken != null) {
    optionMap.putIfAbsent("jwtToken", () => options.jwtToken!);
  }
  optionMap.putIfAbsent("domain", () => options.domain);
  return channel
      .invokeMethod<List>('init', optionMap)
      .then<List>((List? value) => value ?? List.empty());
}