newGroup method

  1. @override
Future<Map<String, dynamic>> newGroup(
  1. List<String> inboxIds,
  2. Map<String, String> options
)
override

Implementation

@override
Future<Map<String, dynamic>> newGroup(
  List<String> inboxIds,
  Map<String, String> options,
) async {
  try {
    final params = <String, dynamic>{
      'inboxIds': inboxIds,
      'options': options,
    }.jsify() as JSObject;

    final result = await _promiseToFuture(
      _clientManager.newGroup(params),
    );

    return _jsObjectToMap(result);
  } catch (e) {
    throw Exception('Failed to create new group: $e');
  }
}