The previous implementation used exact integer comparison which was too strict for real-world scenarios. This change introduces a threshold-based approach that:
Uses 10% of the navigation bar width as tolerance
Better handles floating-point precision
Maintains proper alignment validation
Provides more reliable position detection
Changes made:
Replaced integer comparison with double values
Added threshold calculation (10% of width)
Updated validation logic to use distance-based checks
Maintained original validation intent while being more practical
Test Cases:
Centered FAB with GapLocation.center now works properly
End-positioned FAB with GapLocation.end continues to work
Slight misalignments (within 10% threshold) are properly handled
Note: The previous fix in #23 was a step in the right direction but didn't fully resolve the position validation issues. This PR builds on that work to provide a more robust solution.
Fixes #87
The previous implementation used exact integer comparison which was too strict for real-world scenarios. This change introduces a threshold-based approach that:
Changes made:
Test Cases:
Note: The previous fix in #23 was a step in the right direction but didn't fully resolve the position validation issues. This PR builds on that work to provide a more robust solution.