Localization Changes #3
This commit is contained in:
@@ -4,7 +4,7 @@ class Account {
|
||||
final String accountType;
|
||||
final double balance;
|
||||
final String currency;
|
||||
|
||||
|
||||
Account({
|
||||
required this.id,
|
||||
required this.accountNumber,
|
||||
@@ -12,4 +12,4 @@ class Account {
|
||||
required this.balance,
|
||||
required this.currency,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
|
||||
|
||||
InfoRow(
|
||||
title: AppLocalizations.of(context).customerNumber,
|
||||
value: selectedUser.cifNumber ?? 'N/A',
|
||||
|
@@ -294,10 +294,10 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) =>
|
||||
TransactionDetailsScreen(transaction: tx),
|
||||
),
|
||||
);
|
||||
builder: (_) => TransactionDetailsScreen(
|
||||
transaction: tx),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
@@ -3,7 +3,7 @@ import 'package:kmobile/l10n/app_localizations.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
class TransactionDetailsScreen extends StatelessWidget {
|
||||
final dynamic transaction;
|
||||
final dynamic transaction;
|
||||
|
||||
const TransactionDetailsScreen({super.key, required this.transaction});
|
||||
|
||||
@@ -22,29 +22,30 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
// final file = await File('${tempDir.path}/payment_result.png').create();
|
||||
// await file.writeAsBytes(pngBytes);
|
||||
|
||||
// await Share.shareXFiles(
|
||||
// [XFile(file.path)],
|
||||
// text: AppLocalizations.of(context).paymentResult,
|
||||
// );
|
||||
// } catch (e) {
|
||||
// if (!mounted) return;
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// SnackBar(
|
||||
// content: Text(
|
||||
// '${AppLocalizations.of(context).failedToShareScreenshot}: $e',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// await Share.shareXFiles(
|
||||
// [XFile(file.path)],
|
||||
// text: AppLocalizations.of(context).paymentResult,
|
||||
// );
|
||||
// } catch (e) {
|
||||
// if (!mounted) return;
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// SnackBar(
|
||||
// content: Text(
|
||||
// '${AppLocalizations.of(context).failedToShareScreenshot}: $e',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(AppLocalizations.of(context).transactionDetails)),
|
||||
appBar:
|
||||
AppBar(title: Text(AppLocalizations.of(context).transactionDetails)),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
// Absolute center for amount + icon + date + details
|
||||
// Absolute center for amount + icon + date + details
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Center(
|
||||
@@ -93,39 +94,45 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
child: ListView(
|
||||
children: [
|
||||
// ignore: unnecessary_cast
|
||||
_buildDetailRow(AppLocalizations.of(context).transactionType as String, transaction.type ?? ""),
|
||||
_buildDetailRow(AppLocalizations.of(context).transferType, transaction.name.split("/").first ?? ""),
|
||||
if(transaction.name.length> 12) ... [
|
||||
_buildDetailRow(AppLocalizations.of(context).utrNo, transaction.name.split("= ")[1].split(" ")[0] ?? ""),
|
||||
_buildDetailRow(AppLocalizations.of(context).beneficiaryAccountNo, transaction.name.split("A/C ").last ?? "")
|
||||
_buildDetailRow(
|
||||
AppLocalizations.of(context).transactionType as String,
|
||||
transaction.type ?? ""),
|
||||
_buildDetailRow(AppLocalizations.of(context).transferType,
|
||||
transaction.name.split("/").first ?? ""),
|
||||
if (transaction.name.length > 12) ...[
|
||||
_buildDetailRow(AppLocalizations.of(context).utrNo,
|
||||
transaction.name.split("= ")[1].split(" ")[0] ?? ""),
|
||||
_buildDetailRow(
|
||||
AppLocalizations.of(context).beneficiaryAccountNo,
|
||||
transaction.name.split("A/C ").last ?? "")
|
||||
]
|
||||
],
|
||||
),
|
||||
),
|
||||
// ElevatedButton.icon(
|
||||
// onPressed: _shareScreenshot,
|
||||
// icon: Icon(
|
||||
// Icons.share_rounded,
|
||||
// color: Theme.of(context).primaryColor,
|
||||
// ),
|
||||
// label: Text(
|
||||
// AppLocalizations.of(context).share,
|
||||
// style: TextStyle(color: Theme.of(context).primaryColor),
|
||||
// ),
|
||||
// style: ElevatedButton.styleFrom(
|
||||
// backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// side: BorderSide(color: Theme.of(context).primaryColor, width: 1),
|
||||
// borderRadius: BorderRadius.circular(30),
|
||||
// ),
|
||||
// textStyle: const TextStyle(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// color: Colors.black,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ElevatedButton.icon(
|
||||
// onPressed: _shareScreenshot,
|
||||
// icon: Icon(
|
||||
// Icons.share_rounded,
|
||||
// color: Theme.of(context).primaryColor,
|
||||
// ),
|
||||
// label: Text(
|
||||
// AppLocalizations.of(context).share,
|
||||
// style: TextStyle(color: Theme.of(context).primaryColor),
|
||||
// ),
|
||||
// style: ElevatedButton.styleFrom(
|
||||
// backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// side: BorderSide(color: Theme.of(context).primaryColor, width: 1),
|
||||
// borderRadius: BorderRadius.circular(30),
|
||||
// ),
|
||||
// textStyle: const TextStyle(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// color: Colors.black,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user