getNoDisturbList method Null safety

Future<Map> getNoDisturbList()

Implementation

Future<Map> getNoDisturbList() async {
  Map resJson = await _channel.invokeMethod('getNoDisturbList');
  List userJsons = resJson['userInfoArray'];
  List groupJsons = resJson['groupInfoArray'];

  List<JMUserInfo> users =
      userJsons.map((json) => JMUserInfo.fromJson(json)).toList();
  List<JMGroupInfo> groups =
      groupJsons.map((json) => JMGroupInfo.fromJson(json)).toList();

  return {'userInfos': users, 'groupInfos': groups};
}