BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -7,7 +7,7 @@ import '../models/conversation_model.dart';
|
||||
import '../models/inbox_model.dart';
|
||||
import '../service/fire_store_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../service/send_notification.dart';
|
||||
@@ -21,7 +21,11 @@ class ChatController extends GetxController {
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
if (scrollController.hasClients) {
|
||||
Timer(const Duration(milliseconds: 500), () => scrollController.jumpTo(scrollController.position.maxScrollExtent));
|
||||
Timer(
|
||||
const Duration(milliseconds: 500),
|
||||
() =>
|
||||
scrollController.jumpTo(scrollController.position.maxScrollExtent),
|
||||
);
|
||||
}
|
||||
getArgument();
|
||||
super.onInit();
|
||||
@@ -47,14 +51,20 @@ class ChatController extends GetxController {
|
||||
customerProfileImage.value = argumentData['customerProfileImage'] ?? "";
|
||||
restaurantId.value = argumentData['restaurantId'];
|
||||
restaurantName.value = argumentData['restaurantName'];
|
||||
restaurantProfileImage.value = argumentData['restaurantProfileImage'] ?? "";
|
||||
restaurantProfileImage.value =
|
||||
argumentData['restaurantProfileImage'] ?? "";
|
||||
token.value = argumentData['token'] ?? "";
|
||||
chatType.value = argumentData['chatType'];
|
||||
}
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
||||
Future<void> sendMessage(String message, Url? url, String videoThumbnail, String messageType) async {
|
||||
Future<void> sendMessage(
|
||||
String message,
|
||||
Url? url,
|
||||
String videoThumbnail,
|
||||
String messageType,
|
||||
) async {
|
||||
InboxModel inboxModel = InboxModel(
|
||||
lastSenderId: customerId.value,
|
||||
customerId: customerId.value,
|
||||
@@ -113,18 +123,23 @@ class ChatController extends GetxController {
|
||||
}
|
||||
|
||||
//await SendNotification.sendChatFcmMessage(customerName.value, conversationModel.message.toString(), token.value, {});
|
||||
await SendNotification.sendChatFcmMessage(customerName.value, conversationModel.message.toString(), token.value, {
|
||||
"type": "chat",
|
||||
"chatType": chatType.value,
|
||||
"orderId": orderId.value,
|
||||
"customerId": customerId.value,
|
||||
"customerName": customerName.value,
|
||||
"customerProfileImage": customerProfileImage.value,
|
||||
"restaurantId": restaurantId.value,
|
||||
"restaurantName": restaurantName.value,
|
||||
"restaurantProfileImage": restaurantProfileImage.value,
|
||||
"token": token.value,
|
||||
});
|
||||
await SendNotification.sendChatFcmMessage(
|
||||
customerName.value,
|
||||
conversationModel.message.toString(),
|
||||
token.value,
|
||||
{
|
||||
"type": "chat",
|
||||
"chatType": chatType.value,
|
||||
"orderId": orderId.value,
|
||||
"customerId": customerId.value,
|
||||
"customerName": customerName.value,
|
||||
"customerProfileImage": customerProfileImage.value,
|
||||
"restaurantId": restaurantId.value,
|
||||
"restaurantName": restaurantName.value,
|
||||
"restaurantProfileImage": restaurantProfileImage.value,
|
||||
"token": token.value,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
final ImagePicker imagePicker = ImagePicker();
|
||||
|
||||
Reference in New Issue
Block a user