added icons to all textfields

This commit is contained in:
Rikard Braathen 2022-06-09 11:23:34 +02:00
parent 776cf12b94
commit fd851a35a1
No known key found for this signature in database
GPG Key ID: BB568D1A81F6A965
7 changed files with 12 additions and 0 deletions

View File

@ -164,6 +164,7 @@ class _AddFingerprintDialogState extends ConsumerState<AddFingerprintDialog>
enabled: _fingerprint != null,
border: const OutlineInputBorder(),
labelText: 'Name',
prefixIcon: const Icon(Icons.fingerprint_outlined),
),
onChanged: (value) {
setState(() {

View File

@ -165,6 +165,7 @@ class _PinEntryFormState extends ConsumerState<_PinEntryForm> {
helperText: '', // Prevents dialog resizing
errorText: _pinIsWrong ? _getErrorText() : null,
errorMaxLines: 3,
prefixIcon: const Icon(Icons.pin_outlined),
suffixIcon: IconButton(
icon: Icon(
_isObscure ? Icons.visibility : Icons.visibility_off,

View File

@ -61,6 +61,7 @@ class _FidoPinDialogState extends ConsumerState<FidoPinDialog> {
labelText: 'Current PIN',
errorText: _currentIsWrong ? _currentPinError : null,
errorMaxLines: 3,
prefixIcon: const Icon(Icons.pin_outlined),
),
onChanged: (value) {
setState(() {
@ -82,6 +83,7 @@ class _FidoPinDialogState extends ConsumerState<FidoPinDialog> {
enabled: !hasPin || _currentPin.isNotEmpty,
errorText: _newIsWrong ? _newPinError : null,
errorMaxLines: 3,
prefixIcon: const Icon(Icons.pin_outlined),
),
onChanged: (value) {
setState(() {
@ -96,6 +98,7 @@ class _FidoPinDialogState extends ConsumerState<FidoPinDialog> {
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: 'Confirm PIN',
prefixIcon: const Icon(Icons.pin_outlined),
enabled:
(!hasPin || _currentPin.isNotEmpty) && _newPin.isNotEmpty,
),

View File

@ -63,6 +63,7 @@ class _RenameAccountDialogState extends ConsumerState<RenameFingerprintDialog> {
decoration: const InputDecoration(
border: OutlineInputBorder(),
labelText: 'Label',
prefixIcon: Icon(Icons.fingerprint_outlined),
),
onChanged: (value) {
setState(() {

View File

@ -70,6 +70,7 @@ class _ManagePasswordDialogState extends ConsumerState<ManagePasswordDialog> {
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: 'Current password',
prefixIcon: const Icon(Icons.password_outlined),
errorText: _currentIsWrong ? 'Wrong password' : null,
errorMaxLines: 3),
onChanged: (value) {
@ -125,6 +126,7 @@ class _ManagePasswordDialogState extends ConsumerState<ManagePasswordDialog> {
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: 'New password',
prefixIcon: const Icon(Icons.password_outlined),
enabled: !widget.state.hasKey || _currentPassword.isNotEmpty,
),
onChanged: (value) {
@ -138,6 +140,7 @@ class _ManagePasswordDialogState extends ConsumerState<ManagePasswordDialog> {
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: 'Confirm password',
prefixIcon: const Icon(Icons.password_outlined),
enabled: (!widget.state.hasKey || _currentPassword.isNotEmpty) &&
_newPassword.isNotEmpty,
),

View File

@ -253,6 +253,7 @@ class _UnlockFormState extends ConsumerState<_UnlockForm> {
labelText: 'Password',
errorText: _passwordIsWrong ? 'Wrong password' : null,
helperText: '', // Prevents resizing when errorText shown
prefixIcon: const Icon(Icons.password_outlined),
suffixIcon: IconButton(
icon: Icon(
_isObscure ? Icons.visibility : Icons.visibility_off,

View File

@ -85,6 +85,7 @@ class _RenameAccountDialogState extends ConsumerState<RenameAccountDialog> {
border: OutlineInputBorder(),
labelText: 'Issuer (optional)',
helperText: '', // Prevents dialog resizing when enabled = false
prefixIcon: Icon(Icons.business_outlined),
),
onChanged: (value) {
setState(() {
@ -100,6 +101,7 @@ class _RenameAccountDialogState extends ConsumerState<RenameAccountDialog> {
labelText: 'Account name',
helperText: '', // Prevents dialog resizing when enabled = false
errorText: isValid ? null : 'Your account must have a name',
prefixIcon: const Icon(Icons.people_alt_outlined),
),
onChanged: (value) {
setState(() {