Undefined name 'authManager'. Try correcting the name to one that is defined, or defining the name.
I'm just messing around with getting phone authentication working via a custom action, but can't figure out why there's an error about authManager, when it's defined in
../../auth/firebase_auth/auth_util.dart'
(I'm new to Flutter/Dart, so pardon my ignorance if it's a simple Dart issue.)
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/actions/actions.dart' as action_blocks;
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import '../../auth/firebase_auth/auth_util.dart';
Future customFirebasePhoneAuth(BuildContext context,
String screenNameToNavigate, String phoneNumberDigits) async {
print('customFirebasePhoneAuth called');
final phoneNumberVal = '+1${phoneNumberDigits}';
final authReturn = await authManager.beginPhoneAuth(
context: context,
phoneNumber: phoneNumberVal,
onCodeSent: (context) async {
print('inside onCodeSent');
},
);
print('authReturn: $authReturn');
return authReturn;
}
Thanks for any help!