@@ -2856,10 +2856,16 @@ void FirebaseAuthHostApi::SetUp(flutter::BinaryMessenger* binary_messenger,
28562856 const auto & email_arg =
28572857 std::get<std::string>(encodable_email_arg);
28582858 const auto & encodable_action_code_settings_arg = args.at (2 );
2859- const auto * action_code_settings_arg =
2860- &(std::any_cast<const PigeonActionCodeSettings&>(
2861- std::get<CustomEncodableValue>(
2862- encodable_action_code_settings_arg)));
2859+ // IF CODE REGENERATED, PLEASE REINSERT THIS. IF ARG IS NULL, APP
2860+ // CRASHES
2861+ const PigeonActionCodeSettings* action_code_settings_arg =
2862+ nullptr ;
2863+ if (!encodable_action_code_settings_arg.IsNull ()) {
2864+ action_code_settings_arg =
2865+ &(std::any_cast<const PigeonActionCodeSettings&>(
2866+ std::get<CustomEncodableValue>(
2867+ encodable_action_code_settings_arg)));
2868+ }
28632869 api->SendPasswordResetEmail (
28642870 app_arg, email_arg, action_code_settings_arg,
28652871 [reply](std::optional<FlutterError>&& output) {
@@ -3744,10 +3750,16 @@ void FirebaseAuthUserHostApi::SetUp(flutter::BinaryMessenger* binary_messenger,
37443750 const auto & app_arg = std::any_cast<const AuthPigeonFirebaseApp&>(
37453751 std::get<CustomEncodableValue>(encodable_app_arg));
37463752 const auto & encodable_action_code_settings_arg = args.at (1 );
3747- const auto * action_code_settings_arg =
3748- &(std::any_cast<const PigeonActionCodeSettings&>(
3749- std::get<CustomEncodableValue>(
3750- encodable_action_code_settings_arg)));
3753+ // IF CODE REGENERATED, PLEASE REINSERT THIS. IF ARG IS NULL, APP
3754+ // CRASHES
3755+ const PigeonActionCodeSettings* action_code_settings_arg =
3756+ nullptr ;
3757+ if (!encodable_action_code_settings_arg.IsNull ()) {
3758+ action_code_settings_arg =
3759+ &(std::any_cast<const PigeonActionCodeSettings&>(
3760+ std::get<CustomEncodableValue>(
3761+ encodable_action_code_settings_arg)));
3762+ }
37513763 api->SendEmailVerification (
37523764 app_arg, action_code_settings_arg,
37533765 [reply](std::optional<FlutterError>&& output) {
0 commit comments