最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ios - firebase_ui_auth's showDeleteConfirmationDialog in ProfileScreen is crashing - Stack Overflow

programmeradmin1浏览0评论

I wrap the firebase_ui_auth's ProfileScreen with my own ProfileView for the sake of clear code. The problem is the App stops, do NOTHING when the Delete Account dialog shows. account delete confirmation dialog The app got to be hot restarted to get back to normal but nothing account delete process happened though. I tried to search the same issue on official Github repo, I could not find solutions.

This is the code,

import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_ui_auth/firebase_ui_auth.dart';
import 'package:flutter/material.dart';

class ProfileView extends StatefulWidget {
  const ProfileView({super.key});

  @override
  State<ProfileView> createState() => _ProfileViewState();
}

class _ProfileViewState extends State<ProfileView> {
  final user = FirebaseAuth.instance.currentUser;

  @override
  Widget build(BuildContext context) {
    return ProfileScreen(
      appBar: AppBar(
        title: const Text('Profile'),
      ),
      showDeleteConfirmationDialog: true,
      actions: [
        SignedOutAction((context) {
          Navigator.of(context).pop();
        }),
        AccountDeletedAction((context, user) {
          Navigator.of(context).pop();
        })
      ],
    );
  }
}

发布评论

评论列表(0)

  1. 暂无评论