Fromatting and localizations

This commit is contained in:
2025-12-31 12:44:39 +05:30
parent 60270a5fa9
commit 54a7b8f1b0
21 changed files with 501 additions and 194 deletions

View File

@@ -120,7 +120,7 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Stop Cheque'),
title: Text(AppLocalizations.of(context).stopChequeTitle),
centerTitle: false,
),
body: Stack(
@@ -137,9 +137,9 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Account Number",
style: TextStyle(
Text(
AppLocalizations.of(context).accountNumber,
style: const TextStyle(
fontWeight: FontWeight.bold, fontSize: 18),
),
const SizedBox(width: 16),
@@ -164,7 +164,7 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
),
)
else
const Text('No accounts found'),
Text(AppLocalizations.of(context).noAccountsFound),
],
),
),
@@ -182,8 +182,7 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
StopSingleChequeScreen(
builder: (context) => StopSingleChequeScreen(
selectedAccount: _selectedAccount!,
date: _ciCheque!.Date!,
instrType: _ciCheque!.InstrType!,
@@ -194,9 +193,9 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
);
} else {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
'No cheque book found to stop cheques from.'),
SnackBar(
content: Text(AppLocalizations.of(context)
.noChequebookToStop),
),
);
}
@@ -205,7 +204,8 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
padding: const EdgeInsets.all(16.0),
child: Center(
child: Text(
'Stop Single Cheque',
AppLocalizations.of(context)
.stopSingleChequeTitle,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
@@ -223,8 +223,7 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
const SizedBox(width: 10),
Expanded(
child: Card(
color:
Theme.of(context).colorScheme.primaryContainer,
color: Theme.of(context).colorScheme.primaryContainer,
elevation: 4,
child: InkWell(
onTap: () {
@@ -244,9 +243,9 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
);
} else {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
'Please select an account first.'),
SnackBar(
content: Text(AppLocalizations.of(context)
.pleaseSelectAccountFirst),
),
);
}
@@ -255,7 +254,8 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
padding: const EdgeInsets.all(16.0),
child: Center(
child: Text(
'Stop Multiple Cheques',
AppLocalizations.of(context)
.stopMultipleChequesButton,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
@@ -277,8 +277,9 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
child: _isLoading
? const Center(child: CircularProgressIndicator())
: _ciCheque == null
? const Center(
child: Text('No Cheque Issued status found.'))
? Center(
child: Text(AppLocalizations.of(context)
.noChequeIssuedStatus))
: _buildCiTile(context, _ciCheque!),
),
],
@@ -313,7 +314,7 @@ class _StopChequeScreenState extends State<StopChequeScreen> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Chequebook Details',
Text(AppLocalizations.of(context).chequebookDetailsTitle,
style: Theme.of(context).textTheme.titleLarge),
const SizedBox(height: 8),
_buildInfoRow('Account Number:', _selectedAccount!.accountNo!),