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,4 +1,5 @@
import 'package:customer/controllers/parcel_review_controller.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:get/get.dart';
@@ -27,7 +28,7 @@ class ParcelReviewScreen extends StatelessWidget {
backgroundColor: AppThemeData.primary300,
leading: GestureDetector(onTap: () => Get.back(), child: Icon(Icons.arrow_back_ios, color: isDark ? Colors.white : Colors.black)),
title: Text(
controller.ratingModel.value != null && controller.ratingModel.value!.id!.isNotEmpty ? "Update Review".tr : "Add Review".tr,
controller.ratingModel.value != null && controller.ratingModel.value!.id!.isNotEmpty ? "Update Review".tr() : "Add Review".tr(),
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 16),
),
),
@@ -64,12 +65,12 @@ class ParcelReviewScreen extends StatelessWidget {
// Title
Padding(
padding: const EdgeInsets.only(top: 16),
child: Text('How is your trip?'.tr, style: TextStyle(fontSize: 18, color: isDark ? Colors.white : Colors.black, fontWeight: FontWeight.bold, letterSpacing: 2)),
child: Text('How is your trip?'.tr(), style: TextStyle(fontSize: 18, color: isDark ? Colors.white : Colors.black, fontWeight: FontWeight.bold, letterSpacing: 2)),
),
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
'Your feedback will help us improve \n driving experience better'.tr,
'Your feedback will help us improve \n driving experience better'.tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? Colors.white : Colors.black.withOpacity(0.60), letterSpacing: 0.8),
),
@@ -78,7 +79,7 @@ class ParcelReviewScreen extends StatelessWidget {
// Rating
Padding(
padding: const EdgeInsets.only(top: 20),
child: Text('Rate for'.tr, style: TextStyle(fontSize: 16, color: isDark ? Colors.white : Colors.black.withOpacity(0.60), letterSpacing: 0.8)),
child: Text('Rate for'.tr(), style: TextStyle(fontSize: 16, color: isDark ? Colors.white : Colors.black.withOpacity(0.60), letterSpacing: 0.8)),
),
Padding(
padding: const EdgeInsets.only(top: 8),
@@ -102,13 +103,13 @@ class ParcelReviewScreen extends StatelessWidget {
),
// Comment
Padding(padding: const EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr, controller: controller.comment.value, maxLine: 5)),
Padding(padding: const EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr(), controller: controller.comment.value, maxLine: 5)),
// Submit Button
Padding(
padding: const EdgeInsets.all(20.0),
child: RoundedButtonFill(
title: controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr,
title: controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(),
color: AppThemeData.primary300,
textColor: isDark ? Colors.white : Colors.black,
onPress: controller.submitReview,