getAllInformation method

Future<JInfoModel> getAllInformation()

Future method called getAllInformation has JInfoModel return type.

Implementation

Future<JInfoModel> getAllInformation() async {
  JInfoModel allInfo = JInfoModel();
  try {
    final value = await _methodChannel.invokeMethod<String>(_ALL_INFO);
    if (value != null) {
      final val = json.decode(value);
      allInfo = JInfoModel.fromMap(val);
    }
    return allInfo;
  } catch (e) {
    return allInfo;
  }
}