refactored and condensed technical documentation and comments across the codebase to improve readability
This commit is contained in:
@@ -174,12 +174,10 @@ class _AccountSectionState extends State<AccountSection> {
|
||||
}
|
||||
|
||||
Future<void> _showLogoutDialog(BuildContext context) async {
|
||||
// Sequential logout flow: dialog wipes secure storage, dialog closes
|
||||
// (single Navigator.pop), then we flip the AccountBloc state. The bloc
|
||||
// listener in main.dart pops the Settings route and runs the in-memory
|
||||
// wipe. Triggering setStatus from inside removeData (the previous
|
||||
// approach) raced AsyncDialogAction's pop(true) against popUntil(isFirst)
|
||||
// and could leave the navigator in an inconsistent state.
|
||||
// Flip AccountBloc state only after the dialog fully closes: doing it from
|
||||
// inside removeData (the previous approach) raced AsyncDialogAction's
|
||||
// pop(true) against the listener's popUntil(isFirst) and could leave the
|
||||
// navigator in an inconsistent state.
|
||||
final confirmed = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (dialogContext) => ConfirmDialog(
|
||||
|
||||
Reference in New Issue
Block a user