Skip to content

Commit

Permalink
fix(local auth): update FragmentActivity application
Browse files Browse the repository at this point in the history
  • Loading branch information
ETC\quanlm authored and han2-n committed Jan 24, 2024
1 parent d988a05 commit 196f869
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example.erb_flutter_boilerplate

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

class MainActivity: FlutterActivity() {
class MainActivity: FlutterFragmentActivity() {
}
2 changes: 2 additions & 0 deletions lib/core/infrastructure/services/local_auth_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class LocalAuthenticationService {
return LocalAuthenticationOption.none;
}

// NOTE:local_auth requires the use of a FragmentActivity instead of an Activity. To update your application:
// https://stackoverflow.com/questions/60635356/error-platformexceptionno-fragment-activity-local-auth-plugin-requires-activi
static Future<bool> authenticate([String? localizedReason]) async {
if (!await isDeviceSupported) return false;
try {
Expand Down

0 comments on commit 196f869

Please sign in to comment.