Skip to content

Commit

Permalink
Merge pull request #75 from Web3Auth/android-set-result
Browse files Browse the repository at this point in the history
Add TextField for Email Passwordless in Demo
  • Loading branch information
chaitanyapotti authored May 15, 2024
2 parents 2dba2a4 + b5f3059 commit 74d3014
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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: "abc@xyz.com",
),
),
),
ElevatedButton(
onPressed: _login(_withEmailPasswordless),
child: const Text('Email Passwordless'),
Expand Down Expand Up @@ -308,7 +320,7 @@ class _MyAppState extends State<MyApp> {
LoginParams(
loginProvider: Provider.email_passwordless,
extraLoginOptions: ExtraLoginOptions(
login_hint: "ayush@tor.us",
login_hint: textEditingController.text,
),
),
);
Expand Down

0 comments on commit 74d3014

Please sign in to comment.