Skip to content

Improve camera preview scaling, overlay templates, and gallery/locations UI - #25

Merged
krishna3554 merged 1 commit into
mainfrom
codex/fix-camera-aspect-ratio-rendering
May 16, 2026
Merged

krishna3554 merged 1 commit into
mainfrom
codex/fix-camera-aspect-ratio-rendering

Conversation

@krishna3554

Copy link
Copy Markdown
Owner

Motivation

  • Fix the camera preview letterboxing so the live feed fills the screen edge-to-edge while preserving camera controller initialization and capture resolution.
  • Make the on-camera and burned-in location overlays more legible and visually distinct without touching backend location or saving logic.
  • Replace the bottom-bar Settings entry with a persistent Templates picker and provide three overlay styles (Classic Dark, Minimal Strip, Field Report) that update live.
  • Improve the Locations and Gallery screens for clearer hierarchy, grouping, and interactivity while keeping existing app functionality intact.

Description

  • Camera preview scaling: added _CameraPreviewCover and use of the controller previewSize with FittedBox(fit: BoxFit.cover) so the preview fills the viewport exactly without changing CameraController initialization; changes in lib/features/camera/screen/camera_screen.dart.
  • Overlay templates and UI: added persistent overlayTemplate to AppSettings and SettingsService, implemented a Templates bottom sheet (_showTemplateSheet and _TemplateChoiceTile) and removed the bottom-bar Settings entry in lib/features/camera/screen/camera_screen.dart and lib/models/app_settings.dart / lib/services/settings_service.dart.
  • Overlay readability and stamping: refactored LocationStampCard to support three templates, improved typography, spacing, contrast, compact preview, and map thumbnail clipping in lib/core/widgets/location_stamp_card.dart, and made ImageOverlayService apply the selected template when composing burned-in images and added rendering code for minimal_strip and field_report in lib/services/image_overlay_service.dart.
  • Locations screen redesign: added search, date grouping, card-style rows with map thumbnail and photo count badges, expandable thumbnails, long-press actions, and a map toggle in lib/features/locations/screen/locations_screen.dart.
  • Gallery improvements: converted to date-grouped Sliver sections, tighter 3-column grid, thumbnail overlays, selection mode with share/delete, and a swipeable/pinch-zoom full-screen viewer with share/info/delete controls in lib/features/gallery/screen/gallery_screen.dart.
  • Result saving: pass selected template through to the image composer so live-template selection matches the final saved photo in lib/features/result/screen/result_screen.dart and lib/services/image_overlay_service.dart.

Files changed (high level): lib/features/camera/screen/camera_screen.dart, lib/core/widgets/location_stamp_card.dart, lib/services/image_overlay_service.dart, lib/models/app_settings.dart, lib/services/settings_service.dart, lib/features/locations/screen/locations_screen.dart, lib/features/gallery/screen/gallery_screen.dart, lib/features/result/screen/result_screen.dart.

Testing

  • Ran git diff --check to verify there are no whitespace/indexing issues and it passed.
  • Attempted to run dart format and flutter analyze (dart format ... && flutter analyze) but the environment does not have dart/flutter installed so automatic formatting and static analysis could not be executed.
  • Attempted flutter test but the environment does not have flutter installed so unit/widget tests could not be executed here.

Codex Task

@krishna3554
krishna3554 merged commit cea192e into main May 16, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant