td_receive_static static method

Map<String, dynamic>? td_receive_static({
  1. double timeout = 1.0,
})
override

fetch update

Implementation

static Map<String, dynamic>? td_receive_static({
  double timeout = 1.0,
}) {
  try {
    final TdCharNative update = td_receive_function(timeout);
    if (update.address != 0) {
      final String update_string = update.cast<Utf8>().toDartString();
      if (update_string.isEmpty) {
        return null;
      }
      final Map<String, dynamic> updateOrigin =
          convert.json.decode(update_string);
      return updateOrigin;
    }
    return null;
  } catch (e) {}
  return null;
}