Fixed some errors and delted some commented codes
This commit is contained in:
@@ -102,7 +102,6 @@ class BeneficiaryService {
|
||||
throw Exception("Failed to fetch beneficiaries");
|
||||
}
|
||||
} catch (e) {
|
||||
print("Error fetching beneficiaries: $e");
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@@ -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,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user