Skip to content

Commit

Permalink
fix(#58): adicionar autenticação do dispositivo
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCostaDeOliveira committed Dec 15, 2024
1 parent d545d7c commit 34ba1c4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
3 changes: 3 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.USE_BIOMETRIC"/>

<application
android:label="aranduapp"
android:name="${applicationName}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.example.aranduapp

import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterActivity()
class MainActivity: FlutterFragmentActivity()
13 changes: 10 additions & 3 deletions lib/ui/login/view/LoginView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,15 @@ class _LoginState extends State<_Login> {
width: 291,
height: 64,
child: ElevatedButton(
onPressed: () {
viewModel.loginWithDeviceAuth();
onPressed: () async {
viewModel.loginWithDeviceAuth().then((ok) {
if (ok)
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => const HomeView(),
),
);
});
},
child: const Text('Usar senha do celular'),
),
Expand Down Expand Up @@ -154,7 +161,7 @@ class _LoginState extends State<_Login> {
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => RecoverAccount(),
builder: (context) => RecoverAccount(),
),
);
},
Expand Down

0 comments on commit 34ba1c4

Please sign in to comment.