Language Change
This commit is contained in:
@@ -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