⚙️ Lifecycle API
initialize
Starts Flutter engine, exchanges API key for SDK token.
Must complete before connect or UI.
Optional config: locale, analytics, offline, theme, deep links, safe area, connector. Android also accepts environment ("production" / "staging").
connect
Parameters: token, gender, height, weight.
Returns / exposes user profile id. Do not pass userId in.
Platform names: AzeooSDK.connect (Flutter), connectUser (Android/iOS), connect (RN).
disconnect
Clears user session. SDK remains initialized.
setClubId
Switches active club for azeoo connector. Re-exchanges SDK tokens; user session preserved.
dispose (native)
Tears down engine. Call initialize again to restart.
State flags
| Platform | Flags |
|---|---|
| Flutter | isInitialized, isConnected |
| Android | isInitialized, isUserConnected, isReady |
| iOS | Check SDK instance / connection callbacks |
| RN | useAzeoo().isInitialized, isConnected |
Flutter-only
| API | Purpose |
|---|---|
resetSession | Alias for disconnect |
hardRefreshSdkState | Force refresh after external data changes |
RN lifecycle
onPause, onResume, onMemoryWarning — forwarded automatically by AzeooProvider via AppState; can also be called manually on the SDK wrapper.