getSnapDistance method
Get current distance from follower to its snap position.
Returns the Euclidean distance in screen points. Useful for implementing magnetic snap behavior.
Implementation
Future<double> getSnapDistance(String followerId) async {
final result = await send<double>('getSnapDistance', params: {
'followerId': followerId,
});
if (result == null) {
debugPrint('[SnapClient] getSnapDistance($followerId) returned null — using fallback');
return 0.0;
}
return result;
}