getSnapToEdgeSpace method

Future<double> getSnapToEdgeSpace()

获取吸附后回弹至与边缘的距离

Implementation

Future<double> getSnapToEdgeSpace() async {
  var c = Completer<dynamic>();
  var cmd = _ControllerCommand(ControllerEnumType.getSnapToEdgeSpace, completer: c);
  try {
    _commandController.add(cmd);
  } catch (_) {
    c.complete(0.0);
  }
  if (!_hasListeners) c.complete(0.0);
  return c.future.then((value) => value is double ? value : 0.0);
}