Language Change
This commit is contained in:
@@ -36,7 +36,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
// Call your backend logic here
|
||||
|
||||
final snackBar = SnackBar(
|
||||
content: const Text('Card has been blocked'),
|
||||
content: Text(AppLocalizations.of(context).cardBlocked),
|
||||
action: SnackBarAction(
|
||||
label: 'X',
|
||||
onPressed: () {
|
||||
@@ -62,8 +62,8 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'Block Card',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).blockCard,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
@@ -109,7 +109,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) => value != null && value.length == 11
|
||||
? null
|
||||
: 'Enter valid card number',
|
||||
: AppLocalizations.of(context).enterValidCardNumber,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Row(
|
||||
@@ -135,7 +135,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
obscureText: true,
|
||||
validator: (value) => value != null && value.length == 3
|
||||
? null
|
||||
: 'CVV must be 3 digits',
|
||||
: AppLocalizations.of(context).cvv3Digits,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
@@ -160,7 +160,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
),
|
||||
validator: (value) => value != null && value.isNotEmpty
|
||||
? null
|
||||
: 'Select expiry date',
|
||||
: AppLocalizations.of(context).selectExpiryDate,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@@ -18,8 +18,8 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: const Text(
|
||||
'Card Management',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).cardManagement,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
|
@@ -52,8 +52,8 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'Card Details',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).cardDetails,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
@@ -99,7 +99,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) => value != null && value.length == 11
|
||||
? null
|
||||
: 'Enter valid card number',
|
||||
: AppLocalizations.of(context).enterValidCardNumber,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Row(
|
||||
@@ -125,7 +125,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
obscureText: true,
|
||||
validator: (value) => value != null && value.length == 3
|
||||
? null
|
||||
: 'CVV must be 3 digits',
|
||||
: AppLocalizations.of(context).cvv3Digits,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
@@ -150,7 +150,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
),
|
||||
validator: (value) => value != null && value.isNotEmpty
|
||||
? null
|
||||
: 'Select expiry date',
|
||||
: AppLocalizations.of(context).selectExpiryDate,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -176,7 +176,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
keyboardType: TextInputType.phone,
|
||||
validator: (value) => value != null && value.length >= 10
|
||||
? null
|
||||
: 'Enter valid phone number',
|
||||
: AppLocalizations.of(context).enterValidPhone,
|
||||
),
|
||||
const SizedBox(height: 45),
|
||||
Align(
|
||||
|
@@ -19,7 +19,7 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
// Handle PIN submission logic here
|
||||
final snackBar = SnackBar(
|
||||
content: const Text('PIN set successfully'),
|
||||
content: Text(AppLocalizations.of(context).pinSetSuccess),
|
||||
action: SnackBarAction(
|
||||
label: 'X',
|
||||
onPressed: () {
|
||||
@@ -52,8 +52,8 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'Card PIN',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).cardPin,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
@@ -82,8 +82,8 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
TextFormField(
|
||||
controller: _pinController,
|
||||
obscureText: true,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Enter new PIN',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).enterNewPin,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -99,10 +99,10 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter new PIN';
|
||||
return AppLocalizations.of(context).pleaseEnterNewPin;
|
||||
}
|
||||
if (value.length < 4) {
|
||||
return 'PIN must be at least 4 digits';
|
||||
return AppLocalizations.of(context).pin4Digits;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -111,8 +111,8 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
TextFormField(
|
||||
controller: _confirmPinController,
|
||||
obscureText: true,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Enter Again',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).enterAgain,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -128,7 +128,7 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
textInputAction: TextInputAction.done,
|
||||
validator: (value) {
|
||||
if (value != _pinController.text) {
|
||||
return 'PINs do not match';
|
||||
return AppLocalizations.of(context).pinsDoNotMatch;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -146,7 +146,7 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
backgroundColor: Colors.blue[900],
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Submit'),
|
||||
child: Text(AppLocalizations.of(context).submit),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user