From 1669daf00b3d2cf7fe5e89ca7bf91370612ea026 Mon Sep 17 00:00:00 2001 From: KGCybeX Date: Mon, 27 Nov 2023 23:45:13 +0200 Subject: [PATCH] feat: add web registration from environment --- example/lib/main.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 427dd27b..ef7074de 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -120,7 +120,15 @@ class _AppState extends State { }); } } else { - // for web, we always show the initialisation screen + // for web, we always show the initialisation screen unless we specified an + if (widget.registrationMethod == RegistrationMethod.env) { + bool success = await _registerFromEnvironment(); + if (success) { + setState(() { + twilioInit = true; + }); + } + } } FirebaseAnalytics.instance.logEvent(name: "registration", parameters: {