-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from Web3Auth/android-set-result
Add TextField for Email Passwordless in Demo
- Loading branch information
Showing
1 changed file
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,13 @@ class MyApp extends StatefulWidget { | |
class _MyAppState extends State<MyApp> { | ||
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<MyApp> { | |
onPressed: _login(_withFacebook), | ||
child: const Text('Facebook'), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: TextField( | ||
controller: textEditingController, | ||
decoration: const InputDecoration( | ||
border: OutlineInputBorder(), | ||
hintText: "[email protected]", | ||
), | ||
), | ||
), | ||
ElevatedButton( | ||
onPressed: _login(_withEmailPasswordless), | ||
child: const Text('Email Passwordless'), | ||
|
@@ -308,7 +320,7 @@ class _MyAppState extends State<MyApp> { | |
LoginParams( | ||
loginProvider: Provider.email_passwordless, | ||
extraLoginOptions: ExtraLoginOptions( | ||
login_hint: "[email protected]", | ||
login_hint: textEditingController.text, | ||
), | ||
), | ||
); | ||
|