You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(supabase_flutter): Make Supabase.initialize() idempotent (#1194)
[Supabase] Make initialize() idempotent
This PR introduces a minor update to the initialize() method to avoid throwing when called multiple times. Instead, it logs an informational message and returns the existing instance, making initialization idempotent and smoother for production use.
- Replaced assert(!_instance.isInitialized) with a runtime check to prevent throwing.
- Added _log.info() when a reinitialization attempt occurs.
- Exposed isInitialized as a public read-only getter for improved observability.
- Avoids throwing errors in release mode by gracefully handling repeated initialization.
0 commit comments