Skip to content

Conversation

@hatamirais
Copy link
Collaborator

Feature: Profile Customization, Theme Switching & Permissions

Description

This PR implements comprehensive user profile customization features, a global theme switching system, and robust permission handling for the mobile application. It ensures users can manage their identity and app preferences securely and intuitively.

Changes

👤 Profile Customization

  • User Profile: Implemented UserProfile model and ProfileService to fetch/update user data from Supabase.
  • Avatar Upload: Added functionality to upload profile pictures using image_picker.
  • Source Selection: Users can now choose between Camera and Gallery via a modal bottom sheet.

🎨 Theme System

  • ThemeProvider: Created a riverpod provider to manage ThemeMode (System, Light, Dark).
  • Persistence: Theme preference is saved locally using flutter_secure_storage.
  • UI Integration: Added a dropdown in the Profile screen to switch themes dynamically.
  • Fixes: Resolved surfaceVariant deprecations by migrating to surfaceContainerHighest.

🔐 Permission Handling

  • DevicePermissionService: Created a service to handle runtime permissions cross-platform.
    • Handles Android 13+ granular media permissions (READ_MEDIA_IMAGES).
    • Fallback for older Android versions (READ_EXTERNAL_STORAGE).
  • Flow: Checks permissions before opening the camera/gallery and guides users to settings if denied.
  • Config: Updated AndroidManifest.xml and Info.plist with required usage descriptions.

🌍 Localization

  • Added English (en) and Indonesian (id) translations for:
    • Theme options (Light, Dark, System)
    • Camera/Gallery labels
    • Permission rationale and error messages

Verification

  1. Theme: Go to Profile -> Change Theme to "Dark Mode". Verify the app transforms immediately.
  2. Avatar: Tap the camera icon on your profile picture.
    • Select Gallery.
    • Expected: System permission dialog appears (first time).
    • Action: Allow. Gallery should open.
  3. Permissions: Deny permission and try again.
    • Expected: A snackbar appears directing you to Settings.

- Implement Profile Screen with editing capabilities (Name, Password)
- Add Avatar upload with Camera/Gallery selection
- Implement Theme Switcher (System/Light/Dark) with persistence
- Add Permission Handling for Camera and Gallery using `device_info_plus`
- Localize all new UI elements (en/id)
- Fix deprecation warnings and linting issues in Profile and Auth services
@supabase
Copy link

supabase bot commented Feb 10, 2026

This pull request has been ignored for the connected project imveukxxtdwjgwsafwfl because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@cloudflare-workers-and-pages
Copy link

Deploying awcms with  Cloudflare Pages  Cloudflare Pages

Latest commit: d63eac6
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

Deploying awcms-smandapangkalanbun-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: d63eac6
Status:🚫  Build failed.

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant