Fixed some errors and delted some commented codes

This commit is contained in:
asif
2025-08-24 01:11:29 +05:30
parent e75f48aed5
commit 737ce6cce6
2 changed files with 1 additions and 59 deletions

View File

@@ -102,7 +102,6 @@ class BeneficiaryService {
throw Exception("Failed to fetch beneficiaries");
}
} catch (e) {
print("Error fetching beneficiaries: $e");
return [];
}
}

View File

@@ -11,33 +11,6 @@ class TransactionDetailsScreen extends StatelessWidget {
Widget build(BuildContext context) {
final bool isCredit = transaction.type?.toUpperCase() == 'CR';
// Future<void> _shareScreenshot() async {
// try {
// RenderRepaintBoundary boundary =
// _shareKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
// ui.Image image = await boundary.toImage(pixelRatio: 3.0);
// ByteData? byteData = await image.toByteData(format: ui.ImageByteFormat.png);
// Uint8List pngBytes = byteData!.buffer.asUint8List();
// final tempDir = await getTemporaryDirectory();
// 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',
// ),
// ),
// );
// }
// }
return Scaffold(
appBar:
AppBar(title: Text(AppLocalizations.of(context).transactionDetails)),
@@ -45,7 +18,6 @@ class TransactionDetailsScreen extends StatelessWidget {
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
// Absolute center for amount + icon + date + details
Expanded(
flex: 3,
child: Center(
@@ -85,17 +57,12 @@ class TransactionDetailsScreen extends StatelessWidget {
),
),
),
const Divider(),
// All details
Expanded(
flex: 5,
child: ListView(
children: [
// ignore: unnecessary_cast
_buildDetailRow(
AppLocalizations.of(context).transactionType as String,
_buildDetailRow(AppLocalizations.of(context).transactionType,
transaction.type ?? ""),
_buildDetailRow(AppLocalizations.of(context).transferType,
transaction.name.split("/").first ?? ""),
@@ -109,30 +76,6 @@ class TransactionDetailsScreen extends StatelessWidget {
],
),
),
// 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,
// ),
// ),
// ),
],
),
),