Language Change
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/api/services/auth_service.dart';
|
||||
import 'package:kmobile/api/services/payment_service.dart';
|
||||
@@ -45,7 +47,8 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
|
||||
if (mounted) {
|
||||
setState(() => _loading = false);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Failed to check TPIN status')),
|
||||
SnackBar(
|
||||
content: Text(AppLocalizations.of(context).tpinStatusFailed)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -91,7 +94,9 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
|
||||
await sendTransaction();
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text("Please enter a 6-digit TPIN")),
|
||||
SnackBar(
|
||||
content:
|
||||
Text(AppLocalizations.of(context).enter6DigitTpin)),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
@@ -131,12 +136,13 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
|
||||
final transfer = widget.transactionData;
|
||||
transfer.tpin = _pin.join();
|
||||
try {
|
||||
final paymentResponse = paymentService.processQuickPayWithinBank(transfer);
|
||||
final paymentResponse =
|
||||
paymentService.processQuickPayWithinBank(transfer);
|
||||
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(paymentResponse: paymentResponse)
|
||||
),
|
||||
builder: (_) =>
|
||||
PaymentAnimationScreen(paymentResponse: paymentResponse)),
|
||||
);
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
@@ -157,28 +163,28 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'TPIN',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).tpin,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20.0),
|
||||
child: Column(
|
||||
children: [
|
||||
const Spacer(),
|
||||
const Text(
|
||||
'Enter Your TPIN',
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
_buildPinIndicators(),
|
||||
const Spacer(),
|
||||
_buildKeypad(),
|
||||
],
|
||||
),
|
||||
padding: const EdgeInsets.only(bottom: 20.0),
|
||||
child: Column(
|
||||
children: [
|
||||
const Spacer(),
|
||||
Text(
|
||||
AppLocalizations.of(context).enterTpin,
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
_buildPinIndicators(),
|
||||
const Spacer(),
|
||||
_buildKeypad(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user