Removed bugs and duplicates
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
|
||||||
import 'package:kmobile/data/models/user.dart';
|
import 'package:kmobile/data/models/user.dart';
|
||||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
|
||||||
import '../../../l10n/app_localizations.dart';
|
import '../../../l10n/app_localizations.dart';
|
||||||
|
|
||||||
class AccountInfoScreen extends StatefulWidget {
|
class AccountInfoScreen extends StatefulWidget {
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:kmobile/data/models/user.dart';
|
import 'package:kmobile/data/models/user.dart';
|
||||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
|
||||||
import '../../../l10n/app_localizations.dart';
|
import '../../../l10n/app_localizations.dart';
|
||||||
|
|
||||||
class CustomerInfoScreen extends StatefulWidget {
|
class CustomerInfoScreen extends StatefulWidget {
|
||||||
@@ -20,7 +19,7 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(
|
title: Text(
|
||||||
AppLocalizations.of(context).customer,
|
AppLocalizations.of(context).customerInfo,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
|
@@ -17,9 +17,6 @@ import 'package:kmobile/features/fund_transfer/screens/transaction_pin_screen.da
|
|||||||
import '../../../l10n/app_localizations.dart';
|
import '../../../l10n/app_localizations.dart';
|
||||||
import 'package:kmobile/api/services/payment_service.dart';
|
import 'package:kmobile/api/services/payment_service.dart';
|
||||||
import 'package:kmobile/data/models/transfer.dart';
|
import 'package:kmobile/data/models/transfer.dart';
|
||||||
import 'package:kmobile/api/services/payment_service.dart';
|
|
||||||
import 'package:kmobile/data/models/transfer.dart';
|
|
||||||
|
|
||||||
enum TransactionMode { neft, rtgs, imps }
|
enum TransactionMode { neft, rtgs, imps }
|
||||||
|
|
||||||
class FundTransferAmountScreen extends StatefulWidget {
|
class FundTransferAmountScreen extends StatefulWidget {
|
||||||
@@ -27,7 +24,6 @@ class FundTransferAmountScreen extends StatefulWidget {
|
|||||||
final Beneficiary creditBeneficiary;
|
final Beneficiary creditBeneficiary;
|
||||||
final String remitterName;
|
final String remitterName;
|
||||||
final bool isOwnBank;
|
final bool isOwnBank;
|
||||||
final bool isOwnBank;
|
|
||||||
|
|
||||||
const FundTransferAmountScreen({
|
const FundTransferAmountScreen({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -35,7 +31,6 @@ class FundTransferAmountScreen extends StatefulWidget {
|
|||||||
required this.creditBeneficiary,
|
required this.creditBeneficiary,
|
||||||
required this.remitterName,
|
required this.remitterName,
|
||||||
this.isOwnBank = false,
|
this.isOwnBank = false,
|
||||||
this.isOwnBank = false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -102,51 +97,6 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
);
|
);
|
||||||
return; // Stop further execution
|
return; // Stop further execution
|
||||||
}
|
}
|
||||||
if (widget.isOwnBank) {
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => TransactionPinScreen(
|
|
||||||
onPinCompleted: (pinScreenContext, tpin) async {
|
|
||||||
final transfer = Transfer(
|
|
||||||
fromAccount: widget.debitAccountNo,
|
|
||||||
toAccount: widget.creditBeneficiary.accountNo,
|
|
||||||
toAccountType: 'Savings', // Assuming 'SB' for savings
|
|
||||||
amount: _amountController.text,
|
|
||||||
tpin: tpin,
|
|
||||||
);
|
|
||||||
|
|
||||||
final paymentService = getIt<PaymentService>();
|
|
||||||
final paymentResponseFuture =
|
|
||||||
paymentService.processQuickPayWithinBank(transfer);
|
|
||||||
|
|
||||||
Navigator.of(pinScreenContext).pushReplacement(
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (_) => PaymentAnimationScreen(
|
|
||||||
paymentResponse: paymentResponseFuture),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
if (_selectedMode == TransactionMode.rtgs && amount < 200000) {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (ctx) => AlertDialog(
|
|
||||||
title: Text(AppLocalizations.of(context).invalidRtgs),
|
|
||||||
content: Text(AppLocalizations.of(context).invalidRtgsPopUp),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () => Navigator.of(ctx).pop(),
|
|
||||||
child: Text(AppLocalizations.of(context).ok),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return; // Stop further execution
|
|
||||||
}
|
|
||||||
|
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -164,32 +114,8 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
tpin: tpin,
|
tpin: tpin,
|
||||||
);
|
);
|
||||||
final neftService = getIt<NeftService>();
|
final neftService = getIt<NeftService>();
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => TransactionPinScreen(
|
|
||||||
onPinCompleted: (pinScreenContext, tpin) async {
|
|
||||||
if (_selectedMode == TransactionMode.neft) {
|
|
||||||
final neftTx = NeftTransaction(
|
|
||||||
fromAccount: widget.debitAccountNo,
|
|
||||||
toAccount: widget.creditBeneficiary.accountNo,
|
|
||||||
amount: _amountController.text,
|
|
||||||
ifscCode: widget.creditBeneficiary.ifscCode,
|
|
||||||
remitterName: widget.remitterName,
|
|
||||||
beneficiaryName: widget.creditBeneficiary.name,
|
|
||||||
tpin: tpin,
|
|
||||||
);
|
|
||||||
final neftService = getIt<NeftService>();
|
|
||||||
|
|
||||||
final completer = Completer<PaymentResponse>();
|
|
||||||
final completer = Completer<PaymentResponse>();
|
final completer = Completer<PaymentResponse>();
|
||||||
|
|
||||||
Navigator.of(pinScreenContext).pushReplacement(
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (_) => PaymentAnimationScreen(
|
|
||||||
paymentResponse: completer.future),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
Navigator.of(pinScreenContext).pushReplacement(
|
Navigator.of(pinScreenContext).pushReplacement(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (_) => PaymentAnimationScreen(
|
builder: (_) => PaymentAnimationScreen(
|
||||||
@@ -257,12 +183,6 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
final impsService = getIt<ImpsService>();
|
final impsService = getIt<ImpsService>();
|
||||||
final completer = Completer<PaymentResponse>();
|
final completer = Completer<PaymentResponse>();
|
||||||
|
|
||||||
Navigator.of(pinScreenContext).pushReplacement(
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (_) => PaymentAnimationScreen(
|
|
||||||
paymentResponse: completer.future),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
Navigator.of(pinScreenContext).pushReplacement(
|
Navigator.of(pinScreenContext).pushReplacement(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (_) => PaymentAnimationScreen(
|
builder: (_) => PaymentAnimationScreen(
|
||||||
@@ -319,12 +239,6 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
final rtgsService = getIt<RtgsService>();
|
final rtgsService = getIt<RtgsService>();
|
||||||
final completer = Completer<PaymentResponse>();
|
final completer = Completer<PaymentResponse>();
|
||||||
|
|
||||||
Navigator.of(pinScreenContext).pushReplacement(
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (_) => PaymentAnimationScreen(
|
|
||||||
paymentResponse: completer.future),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
Navigator.of(pinScreenContext).pushReplacement(
|
Navigator.of(pinScreenContext).pushReplacement(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (_) => PaymentAnimationScreen(
|
builder: (_) => PaymentAnimationScreen(
|
||||||
@@ -457,9 +371,9 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
borderColor: Colors.transparent,
|
borderColor: Colors.transparent,
|
||||||
selectedBorderColor: Colors.transparent,
|
selectedBorderColor: Colors.transparent,
|
||||||
splashColor:
|
splashColor:
|
||||||
Theme.of(context).primaryColor.withValues(alpha: 0.1),
|
Theme.of(context).primaryColor,
|
||||||
highlightColor:
|
highlightColor:
|
||||||
Theme.of(context).primaryColor.withValues(alpha: 0.1),
|
Theme.of(context).primaryColor,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
|
||||||
import 'package:kmobile/features/quick_pay/screens/quick_pay_outside_bank_screen.dart';
|
import 'package:kmobile/features/quick_pay/screens/quick_pay_outside_bank_screen.dart';
|
||||||
import 'package:kmobile/features/quick_pay/screens/quick_pay_within_bank_screen.dart';
|
import 'package:kmobile/features/quick_pay/screens/quick_pay_within_bank_screen.dart';
|
||||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||||
|
Reference in New Issue
Block a user