Repository navigation
fix(receive): keep 'Scan another' reachable on short screens - #8
Merged
Merged
Conversation
… reachable on short screens The saved card (icon + title + body + SavedFilePreview + Open file + Scan another) exceeds the body height on short phone screens, so the trailing Scan another button overflowed below the fold and was unreachable. Wrap the Center > ConstrainedBox card content in a shrink-wrapping SingleChildScrollView: tall screens render pixel-identical (the viewport hugs the card and Center still centers it), short screens scroll to reveal the trailing action. Regression test drives the full receive flow on a 480x360 surface where the card cannot fit, scrolls to Scan another, restarts, and starts a fresh session; a tall-surface test pins the unchanged happy-path layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & Why
After a file was received, the "Scan another" button in the saved card was clipped below the fold on phone-sized screens: the card is a non-scrolling
Center > ConstrainedBox > Card > Columnthat overflowed (RenderFlex overflow ~8px), pushing the trailing button off-screen. The only workaround was switching tabs away and back to the Receive tab.The phase cards are now wrapped in a shrink-wrap
SingleChildScrollViewinside theCenter:Centerstill centers it — identical rendering to before.No change to the restart flow itself:
_restart()already stops the camera, disposes the decoder, resets the buffer, and returns to the idle card while reusing the sameCameraController(the correct camera_android pattern — the controller must not be disposed between scans).How it was tested
New regression:
saved card on a short screen: Scan another stays reachable by scrolling and starts a fresh session— completes a real transfer (Rust FFI) at 480x360 logical, asserts the button starts below the fold, scrolls it into view, taps it, returns to idle, and starts a fresh scan with no stale VERIFIED/result. Fails on the previous code withA RenderFlex overflowed by 8.0 pixels.New:
saved card on a tall screen: Scan another is visible without scrolling— the layout renders exactly like pre-fix.cd flutter_app/rust && cargo build --lib && cd flutter_app && flutter analyze && flutter test— 111 tests pass.flutter analyze+flutter testManually tested on: Flutter Android (short-screen overflow reproduced and fixed at 480x360; tall screen unchanged)
Checklist