Enable QR routes, refine UReceived UI & tweaks #10

Merged
waqas.khurshid merged 1 commits from QR_Issues_fixes_sawara into pre_developmnet_branch 13 hours ago

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

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

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

@ -24,7 +24,9 @@ class UReceivedView extends GetView<UReceivedController> {
return Scaffold(
appBar: showAppBar
? DashBoardAppBar(
title: TranslationKeys.makeTranslation(TranslationKeys.textUReceived),
title: TranslationKeys.makeTranslation(
TranslationKeys.textUReceived,
),
onBackButtonPressed: () {
Get.back();
},
@ -37,8 +39,12 @@ class UReceivedView extends GetView<UReceivedController> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 0),
child: controller.depositAccountField = InputField(
refKey: FormFieldConstants.instance().getFormKey("${className}depositAccountField"),
controller: FormFieldConstants.instance().getController("${className}depositAccountField"),
refKey: FormFieldConstants.instance().getFormKey(
"${className}depositAccountField",
),
controller: FormFieldConstants.instance().getController(
"${className}depositAccountField",
),
labelText: "Select Account",
suffixIcon: const Icon(Icons.keyboard_arrow_down, size: 25),
isDropDown: true,
@ -53,7 +59,12 @@ class UReceivedView extends GetView<UReceivedController> {
const SizedBox(height: 10),
Padding(
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
? Expanded(
@ -61,19 +72,35 @@ class UReceivedView extends GetView<UReceivedController> {
child: ListView.builder(
itemCount: controller.uReceivedData.length,
itemBuilder: (context, index) {
UReceivedResponseData data = controller.uReceivedData[index];
UReceivedResponseData data =
controller.uReceivedData[index];
return Padding(
padding: const EdgeInsets.symmetric(vertical: 3.0, horizontal: 15.0),
padding: const EdgeInsets.symmetric(
vertical: 3.0,
horizontal: 15.0,
),
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(
collapsedBackgroundColor: Colors.white,
tilePadding: const EdgeInsets.symmetric(vertical: 0, horizontal: 10),
tilePadding: const EdgeInsets.symmetric(
vertical: 0,
horizontal: 10,
),
dense: false,
// onExpansionChanged: controller.toggleExpansion(),
maintainState: true,
expandedAlignment: Alignment.topLeft,
expandedCrossAxisAlignment: CrossAxisAlignment.start,
expandedCrossAxisAlignment:
CrossAxisAlignment.start,
childrenPadding: const EdgeInsets.all(10),
//tilePadding: EdgeInsets.all(8.0),
collapsedShape: RoundedRectangleBorder(
@ -84,46 +111,110 @@ class UReceivedView extends GetView<UReceivedController> {
backgroundColor: AppColors.white,
leading: Padding(
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(
Icons.keyboard_arrow_down_outlined,
size: 25,
color: AppColors.colorGrey700,
),
title: Text(data.drmbmBkmstitle ?? "-", style: Theme.of(context).textTheme.labelMedium),
title: Text(
data.drmbmBkmstitle ?? "-",
style: Theme.of(context).textTheme.labelMedium,
),
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),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Memo: ", style: Theme.of(context).textTheme.labelSmall),
Text(data.toString(), style: Theme.of(context).textTheme.labelSmall),
Text(
"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),
Row(
children: [
Text("Sent: ", style: Theme.of(context).textTheme.labelSmall),
Text(data.drSgtGntrdate.toString(), style: Theme.of(context).textTheme.labelSmall),
Text(
"Sent: ",
style: Theme.of(
context,
).textTheme.labelSmall,
),
Text(
data.drSgtGntrdate.toString(),
style: Theme.of(
context,
).textTheme.labelSmall,
),
],
),
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),
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),
Text("Sender: ${data.drmbmBkmstitle}", style: Theme.of(context).textTheme.labelSmall),
Text(
"Sender: ${data.drmbmBkmstitle}",
style: Theme.of(context).textTheme.labelSmall,
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () {
controller.reverseTransactionRequest(data.sgtSentGntrnumber, data.sgtSentNodeId);
controller.reverseTransactionRequest(
data.sgtSentGntrnumber,
data.sgtSentNodeId,
);
},
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),
@ -132,7 +223,19 @@ class UReceivedView extends GetView<UReceivedController> {
controller.acceptTransaction(data);
},
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()),
// binding: ChangeTransactionPinOtpBinding(),
// ),
// GetPage(
// name: _Paths.QR_SETTING,
// page: () => responsiveWidget(const QrSettingView()),
// binding: QrSettingBinding(),
// ),
GetPage(
name: _Paths.QR_SETTING,
page: () => responsiveWidget(const QrSettingView()),
binding: QrSettingBinding(),
),
GetPage(
name: _Paths.NOTIFICATIONS,
page: () => responsiveWidget(const NotificationsView()),
@ -408,11 +408,11 @@ class AppPages {
name: _Paths.qrViewScreen,
page: () => responsiveWidget(const QrViewScreen()),
),
// GetPage(
// name: _Paths.qrScanView,
// page: () => responsiveWidget(const QrScanScreen()),
// binding: QrSettingBinding(),
// ),
GetPage(
name: _Paths.qrScanView,
page: () => responsiveWidget(const QrScanScreen()),
binding: QrSettingBinding(),
),
GetPage(
name: _Paths.GENERAL_LEDGER,
page: () => responsiveWidget(const GeneralLedgerView()),

Loading…
Cancel
Save