configure method
Prepares the SDK. Call once at startup, before using any product. Idempotent.
The device identity and network client are ready immediately, then the
session opens in the background: the Future resolves without waiting for
the network. Blocking app startup on a round trip would be paid by every
user, offline ones included.
baseUrl is for development, to point at a local API
(http://localhost:3000 on the iOS simulator, http://10.0.2.2:3000 on
the Android emulator). Leave it null in production.
Implementation
Future<void> configure({
required String appId,
String? baseUrl,
String? realtimeBaseUrl,
}) {
return AppwinCorePlatform.instance.configure(
appId: appId,
baseUrl: baseUrl,
realtimeBaseUrl: realtimeBaseUrl,
);
}