anchor.diff:    String _confirmPassword = '';
     bool _currentIsWrong = false;
   
  +  _submit() async {
  +    final result = await ref
  +        .read(oathStateProvider(widget.path).notifier)
  +        .setPassword(_currentPassword, _newPassword);
  +    if (result) {
  +      Navigator.of(context).pop();
  +      showMessage(context, 'Password set');
  +    } else {
  +      setState(() {
  +        _currentIsWrong = true;
  +      });
  +    }
  +  }
  +
     @override
     Widget build(BuildContext context) {
       // If current device changes, we need to pop back to the main Page.
       ref.listen<DeviceNode?>(currentDeviceProvider, (previous, next) {
         Navigator.of(context).pop();
       });
  +
  +    final isValid = _newPassword.isNotEmpty &&
  +        _newPassword == _confirmPassword &&
  +        (!widget.state.hasKey || _currentPassword.isNotEmpty);
   
       return ResponsiveDialog(
         title: const Text('Manage password'),
  
positive.code:                 _confirmPassword = value;
                });
              },
            ),
          ]
              .map((e) => Padding(
  
negative.code:       ),
        actions: [
          TextButton(
            onPressed: isValid ? _submit : null,
            child: const Text('Save'),
          )
        ],
  