Enable QR routes, refine UReceived UI & tweaks

Uncomment and re-enable QrSettingBinding and QR routes in app_pages to restore QR screens. Refactor UReceivedView layout: tidy formatting, adjust paddings, improve ExpansionTile content (memo truncation, spacing, styles), and better widget line breaks for readability. Comment out the persistent footer button in AddNewAccountView. Comment out the old-vs-new transaction PIN equality check in ChangeTransactionPinController. Miscellaneous formatting and minor UI/behavior cleanups.
QR_Issues_fixes_sawara
Sawara Rehman 13 hours ago
parent 7abfb2b568
commit a8660534c9

@ -20,19 +20,19 @@ class AddNewAccountView extends GetView<AddNewAccountController> {
String className = runtimeType.toString().split('.').last; String className = runtimeType.toString().split('.').last;
return Scaffold( return Scaffold(
persistentFooterButtons: [ // persistentFooterButtons: [
Padding( // Padding(
padding: const EdgeInsets.only(left: 20, right: 30, bottom: 10), // padding: const EdgeInsets.only(left: 20, right: 30, bottom: 10),
child: CustomButton( // child: CustomButton(
onPressed: () { // onPressed: () {
controller.validateAndSendRequest(); // controller.validateAndSendRequest();
}, // },
buttonText: TranslationKeys.makeTranslation(TranslationKeys.textCreateAccount), // buttonText: TranslationKeys.makeTranslation(TranslationKeys.textCreateAccount),
buttonColor: AppColors.colorButton, // buttonColor: AppColors.colorButton,
buttonPadding: const EdgeInsets.only(top: 12, bottom: 12), // buttonPadding: const EdgeInsets.only(top: 12, bottom: 12),
), // ),
) // )
], // ],
appBar: DashBoardAppBar( appBar: DashBoardAppBar(
title: TranslationKeys.makeTranslation(TranslationKeys.textAddAccount), title: TranslationKeys.makeTranslation(TranslationKeys.textAddAccount),
onBackButtonPressed: () { onBackButtonPressed: () {

@ -34,10 +34,10 @@ class ChangeTransactionPinController extends GetxController {
return; return;
} }
if (oldTransactionPinController.text != newTransactionPinController.text) { // if (oldTransactionPinController.text != newTransactionPinController.text) {
Toasty.error("Old and New Transaction Pin not match!"); // Toasty.error("Old and New Transaction Pin not match!");
return; // return;
} // }
if (newTransactionPinController.text != confirmTransactionPinController.text) { if (newTransactionPinController.text != confirmTransactionPinController.text) {
Toasty.error("New and Confirm Transaction Pin not match!"); Toasty.error("New and Confirm Transaction Pin not match!");

@ -1,12 +1,12 @@
// import 'package:get/get.dart'; import 'package:get/get.dart';
//
// import '../controllers/qr_setting_controller.dart'; import '../controllers/qr_setting_controller.dart';
//
// class QrSettingBinding extends Bindings { class QrSettingBinding extends Bindings {
// @override @override
// void dependencies() { void dependencies() {
// Get.lazyPut<QrSettingController>( Get.lazyPut<QrSettingController>(
// () => QrSettingController(), () => QrSettingController(),
// ); );
// } }
// } }

@ -24,7 +24,9 @@ class UReceivedView extends GetView<UReceivedController> {
return Scaffold( return Scaffold(
appBar: showAppBar appBar: showAppBar
? DashBoardAppBar( ? DashBoardAppBar(
title: TranslationKeys.makeTranslation(TranslationKeys.textUReceived), title: TranslationKeys.makeTranslation(
TranslationKeys.textUReceived,
),
onBackButtonPressed: () { onBackButtonPressed: () {
Get.back(); Get.back();
}, },
@ -37,8 +39,12 @@ class UReceivedView extends GetView<UReceivedController> {
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 0), padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 0),
child: controller.depositAccountField = InputField( child: controller.depositAccountField = InputField(
refKey: FormFieldConstants.instance().getFormKey("${className}depositAccountField"), refKey: FormFieldConstants.instance().getFormKey(
controller: FormFieldConstants.instance().getController("${className}depositAccountField"), "${className}depositAccountField",
),
controller: FormFieldConstants.instance().getController(
"${className}depositAccountField",
),
labelText: "Select Account", labelText: "Select Account",
suffixIcon: const Icon(Icons.keyboard_arrow_down, size: 25), suffixIcon: const Icon(Icons.keyboard_arrow_down, size: 25),
isDropDown: true, isDropDown: true,
@ -53,7 +59,12 @@ class UReceivedView extends GetView<UReceivedController> {
const SizedBox(height: 10), const SizedBox(height: 10),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
child: Text(TranslationKeys.makeTranslation(TranslationKeys.textPendingRemittance), style: Theme.of(context).textTheme.bodyMedium), child: Text(
TranslationKeys.makeTranslation(
TranslationKeys.textPendingRemittance,
),
style: Theme.of(context).textTheme.bodyMedium,
),
), ),
controller.uReceivedData.isNotEmpty controller.uReceivedData.isNotEmpty
? Expanded( ? Expanded(
@ -61,19 +72,35 @@ class UReceivedView extends GetView<UReceivedController> {
child: ListView.builder( child: ListView.builder(
itemCount: controller.uReceivedData.length, itemCount: controller.uReceivedData.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
UReceivedResponseData data = controller.uReceivedData[index]; UReceivedResponseData data =
controller.uReceivedData[index];
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 3.0, horizontal: 15.0), padding: const EdgeInsets.symmetric(
vertical: 3.0,
horizontal: 15.0,
),
child: Container( child: Container(
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(5.0)), border: Border.all(color: AppColors.colorGrey350, width: 1.5)), decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(5.0),
),
border: Border.all(
color: AppColors.colorGrey350,
width: 1.5,
),
),
child: ExpansionTile( child: ExpansionTile(
collapsedBackgroundColor: Colors.white, collapsedBackgroundColor: Colors.white,
tilePadding: const EdgeInsets.symmetric(vertical: 0, horizontal: 10), tilePadding: const EdgeInsets.symmetric(
vertical: 0,
horizontal: 10,
),
dense: false, dense: false,
// onExpansionChanged: controller.toggleExpansion(), // onExpansionChanged: controller.toggleExpansion(),
maintainState: true, maintainState: true,
expandedAlignment: Alignment.topLeft, expandedAlignment: Alignment.topLeft,
expandedCrossAxisAlignment: CrossAxisAlignment.start, expandedCrossAxisAlignment:
CrossAxisAlignment.start,
childrenPadding: const EdgeInsets.all(10), childrenPadding: const EdgeInsets.all(10),
//tilePadding: EdgeInsets.all(8.0), //tilePadding: EdgeInsets.all(8.0),
collapsedShape: RoundedRectangleBorder( collapsedShape: RoundedRectangleBorder(
@ -84,46 +111,110 @@ class UReceivedView extends GetView<UReceivedController> {
backgroundColor: AppColors.white, backgroundColor: AppColors.white,
leading: Padding( leading: Padding(
padding: const EdgeInsets.only(top: 3.0), padding: const EdgeInsets.only(top: 3.0),
child: Text("${data.drPcrCurrshort} ${data.sgtGntramt}", style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: AppColors.colorDialogBG)), child: Text(
"${data.drPcrCurrshort} ${data.sgtGntramt}",
style: Theme.of(context).textTheme.bodyMedium
?.copyWith(
color: AppColors.colorDialogBG,
),
),
), ),
trailing: const Icon( trailing: const Icon(
Icons.keyboard_arrow_down_outlined, Icons.keyboard_arrow_down_outlined,
size: 25, size: 25,
color: AppColors.colorGrey700, color: AppColors.colorGrey700,
), ),
title: Text(data.drmbmBkmstitle ?? "-", style: Theme.of(context).textTheme.labelMedium), title: Text(
data.drmbmBkmstitle ?? "-",
style: Theme.of(context).textTheme.labelMedium,
),
children: [ children: [
Text("${data.drPcrCurrshort} ${data.sgtGntramt}", style: Theme.of(context).textTheme.titleSmall?.copyWith(color: AppColors.colorButton)), Text(
"${data.drPcrCurrshort} ${data.sgtGntramt}",
style: Theme.of(context).textTheme.titleSmall
?.copyWith(color: AppColors.colorButton),
),
const SizedBox(height: 5), const SizedBox(height: 5),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text("Memo: ", style: Theme.of(context).textTheme.labelSmall), Text(
Text(data.toString(), style: Theme.of(context).textTheme.labelSmall), "Memo: ",
style: Theme.of(
context,
).textTheme.labelSmall,
),
Expanded(
child: Text(
data.toString(),
style: Theme.of(
context,
).textTheme.labelSmall,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
], ],
), ),
const SizedBox(height: 5), const SizedBox(height: 5),
Row( Row(
children: [ children: [
Text("Sent: ", style: Theme.of(context).textTheme.labelSmall), Text(
Text(data.drSgtGntrdate.toString(), style: Theme.of(context).textTheme.labelSmall), "Sent: ",
style: Theme.of(
context,
).textTheme.labelSmall,
),
Text(
data.drSgtGntrdate.toString(),
style: Theme.of(
context,
).textTheme.labelSmall,
),
], ],
), ),
const SizedBox(height: 5), const SizedBox(height: 5),
Text("Expires Date: ${data.expSgtGntrdate} ", style: Theme.of(context).textTheme.labelSmall), Text(
"Expires Date: ${data.expSgtGntrdate} ",
style: Theme.of(context).textTheme.labelSmall,
),
const SizedBox(height: 5), const SizedBox(height: 5),
Text("Transaction-ID: ${data.sgtSentGntrnumber.toString()}${data.sgtSentNodeId}", style: Theme.of(context).textTheme.labelSmall), Text(
"Transaction-ID: ${data.sgtSentGntrnumber.toString()}${data.sgtSentNodeId}",
style: Theme.of(context).textTheme.labelSmall,
),
const SizedBox(height: 5), const SizedBox(height: 5),
Text("Sender: ${data.drmbmBkmstitle}", style: Theme.of(context).textTheme.labelSmall), Text(
"Sender: ${data.drmbmBkmstitle}",
style: Theme.of(context).textTheme.labelSmall,
),
const SizedBox(height: 20), const SizedBox(height: 20),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
controller.reverseTransactionRequest(data.sgtSentGntrnumber, data.sgtSentNodeId); controller.reverseTransactionRequest(
data.sgtSentGntrnumber,
data.sgtSentNodeId,
);
}, },
child: Column( child: Column(
children: [SvgPicture.asset(AppAssets.ic_cross_option, height: 22, width: 22), const SizedBox(height: 5), CustomText(TranslationKeys.makeTranslation(TranslationKeys.textReverse))], children: [
SvgPicture.asset(
AppAssets.ic_cross_option,
height: 22,
width: 22,
),
const SizedBox(height: 5),
CustomText(
TranslationKeys.makeTranslation(
TranslationKeys.textReverse,
),
),
],
), ),
), ),
const SizedBox(width: 30), const SizedBox(width: 30),
@ -132,7 +223,19 @@ class UReceivedView extends GetView<UReceivedController> {
controller.acceptTransaction(data); controller.acceptTransaction(data);
}, },
child: Column( child: Column(
children: [SvgPicture.asset(AppAssets.ic_tick_option, height: 22, width: 22), const SizedBox(height: 5), CustomText(TranslationKeys.makeTranslation(TranslationKeys.textReceived))], children: [
SvgPicture.asset(
AppAssets.ic_tick_option,
height: 22,
width: 22,
),
const SizedBox(height: 5),
CustomText(
TranslationKeys.makeTranslation(
TranslationKeys.textReceived,
),
),
],
), ),
), ),
], ],
@ -144,7 +247,13 @@ class UReceivedView extends GetView<UReceivedController> {
}, },
), ),
) )
: const Center(child: CustomNoRecord(title: "No Record Found", description: "We couldn't find any activity at this moment")), : const Center(
child: CustomNoRecord(
title: "No Record Found",
description:
"We couldn't find any activity at this moment",
),
),
], ],
); );
}), }),

@ -384,11 +384,11 @@ class AppPages {
// page: () => responsiveWidget(const ChangeTransactionPinOtpView()), // page: () => responsiveWidget(const ChangeTransactionPinOtpView()),
// binding: ChangeTransactionPinOtpBinding(), // binding: ChangeTransactionPinOtpBinding(),
// ), // ),
// GetPage( GetPage(
// name: _Paths.QR_SETTING, name: _Paths.QR_SETTING,
// page: () => responsiveWidget(const QrSettingView()), page: () => responsiveWidget(const QrSettingView()),
// binding: QrSettingBinding(), binding: QrSettingBinding(),
// ), ),
GetPage( GetPage(
name: _Paths.NOTIFICATIONS, name: _Paths.NOTIFICATIONS,
page: () => responsiveWidget(const NotificationsView()), page: () => responsiveWidget(const NotificationsView()),
@ -408,11 +408,11 @@ class AppPages {
name: _Paths.qrViewScreen, name: _Paths.qrViewScreen,
page: () => responsiveWidget(const QrViewScreen()), page: () => responsiveWidget(const QrViewScreen()),
), ),
// GetPage( GetPage(
// name: _Paths.qrScanView, name: _Paths.qrScanView,
// page: () => responsiveWidget(const QrScanScreen()), page: () => responsiveWidget(const QrScanScreen()),
// binding: QrSettingBinding(), binding: QrSettingBinding(),
// ), ),
GetPage( GetPage(
name: _Paths.GENERAL_LEDGER, name: _Paths.GENERAL_LEDGER,
page: () => responsiveWidget(const GeneralLedgerView()), page: () => responsiveWidget(const GeneralLedgerView()),

Loading…
Cancel
Save