BASE: Initialize Localization.
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/chat_controller.dart';
|
||||
import 'package:customer/models/conversation_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -55,7 +56,7 @@ class ChatScreen extends StatelessWidget {
|
||||
ConversationModel inboxModel = ConversationModel.fromJson(documentSnapshots[index].data() as Map<String, dynamic>);
|
||||
return chatItemView(isDark, inboxModel.senderId == FireStoreUtils.getCurrentUid(), inboxModel);
|
||||
},
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
|
||||
// orderBy is compulsory to enable pagination
|
||||
query: FirebaseFirestore.instance
|
||||
.collection(
|
||||
@@ -103,7 +104,7 @@ class ChatScreen extends StatelessWidget {
|
||||
contentPadding: const EdgeInsets.only(top: 3, left: 10),
|
||||
focusedBorder: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
hintText: 'Type message here....'.tr,
|
||||
hintText: 'Type message here....'.tr(),
|
||||
),
|
||||
onSubmitted: (value) async {
|
||||
if (controller.messageController.value.text.isNotEmpty) {
|
||||
@@ -245,7 +246,7 @@ class ChatScreen extends StatelessWidget {
|
||||
|
||||
void onCameraClick(BuildContext context, ChatController controller) {
|
||||
final action = CupertinoActionSheet(
|
||||
message: Text('Send Media'.tr, style: const TextStyle(fontSize: 15.0)),
|
||||
message: Text('Send Media'.tr(), style: const TextStyle(fontSize: 15.0)),
|
||||
actions: <Widget>[
|
||||
CupertinoActionSheetAction(
|
||||
isDefaultAction: false,
|
||||
@@ -257,7 +258,7 @@ class ChatScreen extends StatelessWidget {
|
||||
controller.sendMessage('', url, '', 'image');
|
||||
}
|
||||
},
|
||||
child: Text("Choose image from gallery".tr),
|
||||
child: Text("Choose image from gallery".tr()),
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
isDefaultAction: false,
|
||||
@@ -271,7 +272,7 @@ class ChatScreen extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Text("Choose video from gallery".tr),
|
||||
child: Text("Choose video from gallery".tr()),
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
isDestructiveAction: false,
|
||||
@@ -283,7 +284,7 @@ class ChatScreen extends StatelessWidget {
|
||||
controller.sendMessage('', url, '', 'image');
|
||||
}
|
||||
},
|
||||
child: Text("Take a picture".tr),
|
||||
child: Text("Take a picture".tr()),
|
||||
),
|
||||
// CupertinoActionSheetAction(
|
||||
// isDestructiveAction: false,
|
||||
@@ -295,11 +296,11 @@ class ChatScreen extends StatelessWidget {
|
||||
// controller.sendMessage('', videoContainer.videoUrl, videoContainer.thumbnailUrl, 'video');
|
||||
// }
|
||||
// },
|
||||
// child: Text("Record video".tr),
|
||||
// child: Text("Record video".tr()),
|
||||
// )
|
||||
],
|
||||
cancelButton: CupertinoActionSheetAction(
|
||||
child: Text('Cancel'.tr),
|
||||
child: Text('Cancel'.tr()),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:customer/models/user_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -27,7 +28,7 @@ class DriverInboxScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Driver Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Driver Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body: FirestorePagination(
|
||||
//item builder type is compulsory.
|
||||
@@ -37,7 +38,7 @@ class DriverInboxScreen extends StatelessWidget {
|
||||
InboxModel inboxModel = InboxModel.fromJson(data!);
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
|
||||
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
|
||||
@@ -113,7 +114,7 @@ class DriverInboxScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
shrinkWrap: true,
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
|
||||
// orderBy is compulsory to enable pagination
|
||||
query: FirebaseFirestore.instance.collection('chat_driver').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
|
||||
//Change types customerId
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/widget/firebase_pagination/src/fireStore_pagination.dart';
|
||||
import 'package:customer/widget/firebase_pagination/src/models/view_type.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -28,7 +29,7 @@ class RestaurantInboxScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Store Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Store Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body: FirestorePagination(
|
||||
//item builder type is compulsory.
|
||||
@@ -38,7 +39,7 @@ class RestaurantInboxScreen extends StatelessWidget {
|
||||
InboxModel inboxModel = InboxModel.fromJson(data!);
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
|
||||
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
|
||||
@@ -115,7 +116,7 @@ class RestaurantInboxScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
shrinkWrap: true,
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
|
||||
// orderBy is compulsory to enable pagination
|
||||
query: FirebaseFirestore.instance.collection('chat_store').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
|
||||
//Change types customerId
|
||||
|
||||
Reference in New Issue
Block a user