Skip to content

Commit

Permalink
feat: My account, modals, change callback name
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalheartxs committed Sep 27, 2024
1 parent 50974e4 commit dfe1786
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion catalyst_voices/lib/pages/account/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class AccountPage extends StatelessWidget {
context: context,
builder: (context) {
return DeleteKeychainDialog(
onDeleteKeychain: () async {
onRemoveKeychainConfirmed: () async {
// TODO(Jakub): remove keychain
Navigator.of(context).pop();
await VoicesDialog.show<void>(
Expand Down
6 changes: 3 additions & 3 deletions catalyst_voices/lib/pages/account/delete_keychain_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import 'package:catalyst_voices_localization/catalyst_voices_localization.dart';
import 'package:flutter/material.dart';

class DeleteKeychainDialog extends StatefulWidget {
final VoidCallback? onDeleteKeychain;
final VoidCallback? onRemoveKeychainConfirmed;

const DeleteKeychainDialog({
super.key,
this.onDeleteKeychain,
this.onRemoveKeychainConfirmed,
});

@override
Expand Down Expand Up @@ -138,7 +138,7 @@ class _DeleteKeychainDialogState extends State<DeleteKeychainDialog> {
Future<void> _onRemoveKeychainTap() async {
if (_textEditingController.text ==
context.l10n.deleteKeychainDialogRemovingPhrase) {
widget.onDeleteKeychain?.call();
widget.onRemoveKeychainConfirmed?.call();
} else {
setState(() {
_errorText = context.l10n.deleteKeychainDialogErrorText;
Expand Down

0 comments on commit dfe1786

Please sign in to comment.