Skip to content

feature/supa_avatar - #136

Closed
0xharkirat wants to merge 10 commits into
supabase-community:mainfrom
0xharkirat:feature/supa-avatar
Closed

0xharkirat wants to merge 10 commits into
supabase-community:mainfrom
0xharkirat:feature/supa-avatar

Conversation

@0xharkirat

Copy link
Copy Markdown

What kind of change does this PR introduce?

  • ✨ Feature: Add SupaAvatar widget for displaying & editing user profile avatars.
  • 📝 Documentation: Include full usage and customization guide in README.
  • 🔧 Refactor: Restructure example app folders for clarity & modularity.
  • 🚦 Routing: Add go_router with route redirection based on Supabase auth state.
  • 🐛 Bugfix
  • ✅ Test updates

What is the current behavior?

  • No reusable avatar upload component for Supabase users.
  • Example app has a flat and less scalable structure.
  • No route redirection based on user auth session.

What is the new behavior?

🖼️ SupaAvatar Widget

  • Readonly & editable avatar display
  • Upload, override, and delete from Supabase Storage
  • Customizable metadata key (avatar_url by default)
  • Cache-busting for real-time UI updates
  • Bottom sheet for picking or removing avatar
  • Configurable design via props

avatar-demo

🗂️ Refactored Folder Structure of example app

Organized example app into:

lib/
└── src/
    ├── core/       # App config and shared constants
    │   └── app_router.dart
    └── views/      # Screens: SignIn, Home, etc.

🔐 Auth-Aware Routing

  • Redirects to /sign_in_up if user is signed out
  • Redirects to / if user is signed in

Additional context

Usage

SupaAvatar(
  radius: 48,
  isEditable: true,
  supabaseStoragePath: 'profile',
)

@0xharkirat

0xharkirat commented Apr 15, 2025 •

Copy link
Copy Markdown
Author

Added: Editor Type (modal or dialog),
Shows username or email initials while the image is loading using my own package ui_avatar,

Much more to come.

0415 (2)

@0xharkirat

Copy link
Copy Markdown
Author

fix the ui of avatar editor to clean & simple.

dialog modal
Simulator Screenshot - iPhone 15 Pro - 2025-04-15 at 14 56 50 Simulator Screenshot - iPhone 15 Pro - 2025-04-15 at 14 57 07

@0xharkirat

Copy link
Copy Markdown
Author

Hey Team, any comments or feedback? I am planning to build more flutter ui components for supabase, like firebase has for storage, database & many more.

Comment thread example/lib/main.dart Outdated
@jwelmac

jwelmac commented Jul 24, 2025

Copy link
Copy Markdown

I love the changes you made here.
It really adds to the functionality of the Auth UI

@0xharkirat

Copy link
Copy Markdown
Author

I love the changes you made here. It really adds to the functionality of the Auth UI

Yeah. I wanted to create more UI features for supabase. I was very excited when I started working on it but no one replied for 3 months & I got disappointed. But this morning I saw this comment & really made my day. Kindly let me know if I should work on more UI features for flutter sdk?

@jwelmac

jwelmac commented Jul 25, 2025

Copy link
Copy Markdown

Its a pleasure my brother.

I think it would be great if you could do that.

I am not sure what is happening in supabase_community as I currently have two open PRs in the mock_supabase_http_client package since March.
supabase-community/mock_supabase_http_client#20
supabase-community/mock_supabase_http_client#22

It can get disappointing when you are trying to help and then no response.

If you are up for it, we can create a fork to maintain and grow. If this package starts to get maintained regularly once again we can always merge back into the main repository.
But, in that way we can help the community at large while the supabase_community maintainers tackle the issues they deem higher priority.

@spydon

spydon commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Hi @0xharkirat,
sorry for the wait, we haven't had anyone maintaining this repository for a long time, but now I'm the maintainer.
I don't think this PR belongs in this package, since this doesn't strictly have to do with authentication.
Another real blocker is that it pulls in ìmage_picker which pulls in native plugins, which makes dependency resolution harder for end users, even if they don't use this feature.

It's a good feature though and I'd recommend you to release this as a separate package, since it can be made fully standalone!

@spydon spydon closed this Jun 23, 2026
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.

3 participants