inboxStatesForInboxIds method

  1. @override
Future<List<Map<String, dynamic>>> inboxStatesForInboxIds(
  1. List<String> inboxIds, {
  2. bool refreshFromNetwork = true,
})
override

Implementation

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

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

    return _jsArrayToListOfMaps(result as JSArray);
  } catch (e) {
    throw Exception('Failed to get inbox states: $e');
  }
}