diff --git a/example/lib/main.dart b/example/lib/main.dart index f9e8eca..f340f2a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -24,11 +24,13 @@ class MyApp extends StatefulWidget { class _MyAppState extends State { String _result = ''; bool logoutVisible = false; + late final TextEditingController textEditingController; @override void initState() { super.initState(); initPlatformState(); + textEditingController = TextEditingController(); } // Platform messages are asynchronous, so we initialize in an async method. @@ -148,6 +150,16 @@ class _MyAppState extends State { onPressed: _login(_withFacebook), child: const Text('Facebook'), ), + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + controller: textEditingController, + decoration: const InputDecoration( + border: OutlineInputBorder(), + hintText: "abc@xyz.com", + ), + ), + ), ElevatedButton( onPressed: _login(_withEmailPasswordless), child: const Text('Email Passwordless'), @@ -308,7 +320,7 @@ class _MyAppState extends State { LoginParams( loginProvider: Provider.email_passwordless, extraLoginOptions: ExtraLoginOptions( - login_hint: "ayush@tor.us", + login_hint: textEditingController.text, ), ), );