changed add beneficiary screen to to improve UI
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:kmobile/api/services/beneficiary_service.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'beneficiary_result_page.dart';
|
||||
import '../../../di/injection.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
@@ -352,6 +353,36 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
isDense: true,
|
||||
),
|
||||
),
|
||||
if (_isBeneficiaryValidated)
|
||||
Column(
|
||||
children: [
|
||||
const SizedBox(height: 24),
|
||||
TextFormField(
|
||||
controller: nameController,
|
||||
enabled: false,
|
||||
decoration: InputDecoration(
|
||||
suffixIcon: _isBeneficiaryValidated
|
||||
? const Icon(
|
||||
Symbols.verified,
|
||||
size: 25,
|
||||
fill: 1,
|
||||
)
|
||||
: null,
|
||||
suffixIconColor:
|
||||
Theme.of(context).colorScheme.primary,
|
||||
labelText: AppLocalizations.of(context)
|
||||
.beneficiaryName,
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
),
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) => value == null ||
|
||||
value.isEmpty
|
||||
? AppLocalizations.of(context).nameRequired
|
||||
: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
if (!_isBeneficiaryValidated)
|
||||
Padding(
|
||||
@@ -386,21 +417,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
),
|
||||
),
|
||||
//Beneficiary Name (Disabled)
|
||||
TextFormField(
|
||||
controller: nameController,
|
||||
enabled: false,
|
||||
decoration: InputDecoration(
|
||||
labelText:
|
||||
AppLocalizations.of(context).beneficiaryName,
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
),
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) => value == null || value.isEmpty
|
||||
? AppLocalizations.of(context).nameRequired
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
// 🔹 Account Type Dropdown
|
||||
DropdownButtonFormField<String>(
|
||||
value: accountType,
|
||||
|
Reference in New Issue
Block a user