-
Notifications
You must be signed in to change notification settings - Fork 9
feat: route gesture tracking #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Coverage ReportThis is an automatic coverage report for 2fcd095, proudly generated by Dart Coverage Assistant 🎯🧪. Monorepo coverageThis repository contains 6 Dart projects. This is is the total coverage across all of them:
|
| File | Line Percentage | Line Count |
|---|---|---|
| lib/src | ||
| drag_dismissable.dart | 0.00 | 87 |
| heroine_route_mixin.dart | 0.00 | 24 |
| heroine_velocity.dart | 42.86 | 7 |
| heroines.dart | 71.74 | 138 |
| heroine_velocity_tracker.dart | 0.00 | 47 |
| heroine_widget.dart | 97.78 | 90 |
| heroine_location.dart | 85.71 | 21 |
| flight_controller.dart | 62.26 | 159 |
| flight_spec.dart | 78.79 | 33 |
| shuttle_builders.dart | 70.83 | 96 |
motor
A unified motion system for Flutter - physics-based springs and duration-based curves under one API.
Coverage Details for motor
| File | Line Percentage | Line Count |
|---|---|---|
| lib/src | ||
| motion.dart | 56.28 | 183 |
| motion_sequence.dart | 75.16 | 161 |
| motion_converter.dart | 74.36 | 78 |
| motion_curve.dart | 75.00 | 8 |
| phase_transition.dart | 52.17 | 23 |
| lib/src/controllers | ||
| motion_controller.dart | 89.35 | 310 |
| single_motion_controller.dart | 100.00 | 4 |
| lib/src/simulations | ||
| curve_simulation.dart | 100.00 | 15 |
| no_motion_simulation.dart | 100.00 | 7 |
| lib/src/widgets | ||
| motion_builder.dart | 81.82 | 11 |
| motion_draggable.dart | 84.69 | 98 |
| sequence_motion_builder.dart | 94.85 | 97 |
| velocity_motion_builder.dart | 84.62 | 13 |
| base_motion_builder.dart | 72.92 | 48 |
| lib/src/widgets/layout | ||
| padding_extended.dart | 50.45 | 111 |
| lib/src/widgets/motion | ||
| motion_padding.dart | 0.00 | 13 |
rivership
An opinionated infrastructure package for use with hooks_riverpod.
Coverage Details for rivership
| File | Line Percentage | Line Count |
|---|---|---|
| lib/src/design | ||
| blend_color_tween.dart | 0.00 | 4 |
| simple_widget_states.dart | 0.00 | 11 |
| lib/src/extensions | ||
| async_value_tools.dart | 50.00 | 2 |
| brightness_tools.dart | 100.00 | 4 |
| date_time_tools.dart | 90.57 | 53 |
| duration_formatting.dart | 100.00 | 10 |
| hct_tools.dart | 14.29 | 14 |
| iterable_tools.dart | 100.00 | 24 |
| object_try_as.dart | 100.00 | 1 |
| ref_cache.dart | 28.57 | 14 |
| string_if_not_empty.dart | 100.00 | 1 |
| lib/src/hooks | ||
| use_date_format.dart | 0.00 | 8 |
| use_delayed.dart | 100.00 | 15 |
| use_fixed_extent_scroll_controller.dart | 100.00 | 15 |
| use_keyed_state.dart | 76.47 | 17 |
| use_motion.dart | 67.27 | 55 |
| use_motion_utils.dart | 20.00 | 10 |
| use_page.dart | 100.00 | 14 |
| use_tween_animation.dart | 85.48 | 62 |
| lib/src/widgets | ||
| animated_size_switcher.dart | 2.63 | 38 |
| animated_text.dart | 0.00 | 25 |
snaptest
Snap photos in your widget tests.
Coverage Details for snaptest
| File | Line Percentage | Line Count |
|---|---|---|
| lib/src | ||
| fake_device.dart | 60.00 | 5 |
| font_loading.dart | 64.23 | 123 |
| screenshot_test_function.dart | 100.00 | 6 |
| snap.dart | 90.70 | 172 |
| snaptest_settings.dart | 30.77 | 13 |
| blocked_text_painting_context.dart | 33.33 | 93 |
| flutter_sdk_root.dart | 83.33 | 6 |
springster
Spring animations and simulations, simplified.
Coverage Details for springster
| File | Line Percentage | Line Count |
|---|---|---|
| lib/src | ||
| spring.dart | 70.97 | 31 |
| spring_builder.dart | 100.00 | 23 |
| spring_curve.dart | 100.00 | 6 |
| spring_draggable.dart | 100.00 | 25 |
| spring_simulation_controller.dart | 90.91 | 22 |
| spring_simulation_controller_2d.dart | 93.75 | 32 |
| spring_simulation_controller_base.dart | 80.00 | 5 |
stupid_simple_sheet
A simple sheet widget for Flutter.
Coverage Details for stupid_simple_sheet
| File | Line Percentage | Line Count |
|---|---|---|
| lib | ||
| stupid_simple_sheet.dart | 90.12 | 162 |
| lib/src | ||
| clamped_animation.dart | 100.00 | 9 |
| cupertino_sheet_copy.dart | 100.00 | 86 |
| optimized_clip.dart | 65.00 | 20 |
| sheet_background.dart | 100.00 | 14 |
| snapping_point.dart | 66.67 | 66 |
| stupid_simple_cupertino_sheet.dart | 82.61 | 46 |
timcreatedit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have time to review this fully but let's talk about it conceptually to help me understand. Right now I feel like this adds a lot of complexity and abstraction to this package (which is already a bit more complex than it could be to be fair) and I'm a bit scared to introduce too much maintenance overhead. I wonder if we can move things around and keep the feature set a bit more minimal to keep it simpler :)
| class _TransitionBarrier { | ||
| _TransitionBarrier({ | ||
| required this.transitionId, | ||
| required this.tags, | ||
| }) : _remaining = Set<Object>.from(tags); | ||
|
|
||
| final int transitionId; | ||
| final Set<Object> tags; | ||
| final Set<Object> _remaining; | ||
|
|
||
| bool markComplete(Object tag) { | ||
| _remaining.remove(tag); | ||
| return _remaining.isEmpty; | ||
| } | ||
|
|
||
| bool removeTag(Object tag) { | ||
| _remaining.remove(tag); | ||
| return _remaining.isEmpty; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't understand what this is for, and it seems to add a lot of complexity, is this related to user gestures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, technically that could be on its own branch. The problem was that, when multiple heroes fly around, their shuttles should disappear at once; otherwise, we could see strange pop effects. For example when the heroes fly onto a stack, since the shuttles and the actual widgets live in different 'z-index spaces'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's strange... I think that's a new artifact, since the shuttles should disappear when the route transition ends iirc, shouldn't that be the same timing for all heroes? Or did that change with the gesture support
Description:
This PR implements support for Heroine animations during interactive route transitions (e.g., user-driven back swipes).
Motion Handoff Strategy
A challenge was defining the hero's motion after a user releases a gesture. We use a clamped motion with the current progress + let go velocity.
HeroineVelocityTracker: Added to sample position data during the gesture. The calculated release velocity is passed to the handoff builder to preserve momentum when the spring simulation takes over.API Changes
animateOnUserGestures: A flag on the Heroine widget to enable participation in interactive transitions. Defaults to false to match existing behavior.