BASE: Initialize Localization.

This commit is contained in:
2025-12-03 18:21:19 +05:00
parent cf58d069ab
commit b04050384d
141 changed files with 1577 additions and 1419 deletions

View File

@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:customer/constant/constant.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';
@@ -57,7 +58,7 @@ class _MercadoPagoScreenState extends State<MercadoPagoScreen> {
},
child: Scaffold(
appBar: AppBar(
title: Text("Payment".tr),
title: Text("Payment".tr()),
centerTitle: false,
leading: GestureDetector(
onTap: () {
@@ -77,18 +78,18 @@ class _MercadoPagoScreenState extends State<MercadoPagoScreen> {
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: Text('Cancel Payment'.tr),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr)),
title: Text('Cancel Payment'.tr()),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr())),
actions: <Widget>[
TextButton(
child: Text('Cancel'.tr, style: const TextStyle(color: Colors.red)),
child: Text('Cancel'.tr(), style: const TextStyle(color: Colors.red)),
onPressed: () {
Navigator.of(context).pop();
Get.back(result: false);
},
),
TextButton(
child: Text('Continue'.tr, style: const TextStyle(color: Colors.green)),
child: Text('Continue'.tr(), style: const TextStyle(color: Colors.green)),
onPressed: () {
Navigator.of(context).pop();
},

View File

@@ -3,6 +3,7 @@
import 'dart:developer';
import 'package:customer/models/payment_model/pay_fast_model.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -84,17 +85,17 @@ class _PayFastScreenState extends State<PayFastScreen> {
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Cancel Payment'),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr)),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr())),
actions: <Widget>[
TextButton(
child: Text('Exit'.tr, style: TextStyle(color: Colors.red)),
child: Text('Exit'.tr(), style: TextStyle(color: Colors.red)),
onPressed: () {
Get.back();
Get.back(result: false);
},
),
TextButton(
child: Text('Continue Payment'.tr, style: TextStyle(color: Colors.green)),
child: Text('Continue Payment'.tr(), style: TextStyle(color: Colors.green)),
onPressed: () {
Get.back();
},

View File

@@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:developer';
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';
@@ -91,18 +92,18 @@ class _MidtransScreenState extends State<MidtransScreen> {
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: Text('Cancel Payment'.tr),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr)),
title: Text('Cancel Payment'.tr()),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr())),
actions: <Widget>[
TextButton(
child: Text('Cancel'.tr, style: const TextStyle(color: Colors.red)),
child: Text('Cancel'.tr(), style: const TextStyle(color: Colors.red)),
onPressed: () {
Get.back(result: false);
Get.back(result: false);
},
),
TextButton(
child: Text('Continue'.tr, style: const TextStyle(color: Colors.green)),
child: Text('Continue'.tr(), style: const TextStyle(color: Colors.green)),
onPressed: () {
Get.back(result: false);
},

View File

@@ -3,6 +3,7 @@
import 'dart:async';
import 'dart:convert';
import 'package:customer/models/payment_model/orange_money.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
@@ -107,7 +108,7 @@ class _OrangeMoneyScreenState extends State<OrangeMoneyScreen> {
appBar: AppBar(
backgroundColor: Colors.black,
leading: IconButton(icon: const Icon(Icons.arrow_back, color: Colors.white), onPressed: _showCancelDialog),
title: Text('Orange Money Payment'.tr),
title: Text('Orange Money Payment'.tr()),
),
body: isLoading ? const Center(child: CircularProgressIndicator()) : WebViewWidget(controller: controller),
),
@@ -120,12 +121,12 @@ class _OrangeMoneyScreenState extends State<OrangeMoneyScreen> {
barrierDismissible: true,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Cancel Payment'.tr),
content: Text('Are you sure you want to cancel this payment?'.tr),
title: Text('Cancel Payment'.tr()),
content: Text('Are you sure you want to cancel this payment?'.tr()),
actions: [
TextButton(child: Text('No', style: TextStyle(color: Colors.green)), onPressed: () => Get.back()),
TextButton(
child: Text('Yes'.tr, style: TextStyle(color: Colors.red)),
child: Text('Yes'.tr(), style: TextStyle(color: Colors.red)),
onPressed: () {
timer?.cancel();
Get.back(); // close dialog
@@ -298,14 +299,14 @@ class _OrangeMoneyScreenState extends State<OrangeMoneyScreen> {
// barrierDismissible: true, // user must tap button!
// builder: (BuildContext context) {
// return AlertDialog(
// title: Text('Cancel Payment'.tr),
// title: Text('Cancel Payment'.tr()),
// content: SingleChildScrollView(
// child: Text("cancelPayment?".tr),
// child: Text("cancelPayment?".tr()),
// ),
// actions: <Widget>[
// TextButton(
// child: Text(
// 'Cancel'.tr,
// 'Cancel'.tr(),
// style: const TextStyle(color: Colors.red),
// ),
// onPressed: () {
@@ -315,7 +316,7 @@ class _OrangeMoneyScreenState extends State<OrangeMoneyScreen> {
// ),
// TextButton(
// child: Text(
// 'Continue'.tr,
// 'Continue'.tr(),
// style: const TextStyle(color: Colors.green),
// ),
// onPressed: () {

View File

@@ -2,6 +2,7 @@ import 'dart:async';
import 'package:customer/payment/paystack/paystack_url_genrater.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';
@@ -72,7 +73,7 @@ class _PayStackScreenState extends State<PayStackScreen> {
child: Scaffold(
appBar: AppBar(
backgroundColor: AppThemeData.grey50,
title: Text("Payment".tr),
title: Text("Payment".tr()),
centerTitle: false,
leading: GestureDetector(
onTap: () {

View File

@@ -3,6 +3,7 @@ import 'dart:convert';
import 'dart:developer';
import 'package:customer/payment/xenditModel.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
@@ -112,18 +113,18 @@ class _XenditScreenState extends State<XenditScreen> {
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: Text('Cancel Payment'.tr),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr)),
title: Text('Cancel Payment'.tr()),
content: SingleChildScrollView(child: Text("Cancel Payment?".tr())),
actions: <Widget>[
TextButton(
child: Text('Cancel'.tr, style: const TextStyle(color: Colors.red)),
child: Text('Cancel'.tr(), style: const TextStyle(color: Colors.red)),
onPressed: () {
Navigator.of(context).pop(false);
Navigator.of(context).pop(false);
},
),
TextButton(
child: Text('Continue'.tr, style: const TextStyle(color: Colors.green)),
child: Text('Continue'.tr(), style: const TextStyle(color: Colors.green)),
onPressed: () {
Navigator.of(context).pop(false);
},