Commit cdbe1e86 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

Responsive and ui correction

parent a7b582d7
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>
\ No newline at end of file
......@@ -142,16 +142,22 @@ class HelpAndEnquiryProvider extends ChangeNotifier {
_chatResponse = null;
_errorMessage = response?.message ?? "Something went wrong";
}
/// Force UI to rebuild after data change
notifyListeners();
} catch (e) {
debugPrint("❌ Provider Error (fetchTicketChatDisplay): $e");
_errorMessage = e.toString();
_chatResponse = null;
notifyListeners(); // also notify here
} finally {
_isLoading = false;
notifyListeners();
}
}
/// Optional: Clear data (for refresh or reset)
void clearChatData() {
_chatResponse = null;
......@@ -178,11 +184,13 @@ class HelpAndEnquiryProvider extends ChangeNotifier {
}) async {
_setSending(true);
try {
// ✅ Convert List<File> to List<MultipartFile>
// Create a copy so the original list can’t be modified during iteration
final safeImages = List<File>.from(images);
List<http.MultipartFile> multipartImages = [];
for (var file in images) {
for (var file in safeImages) {
final multipartFile = await http.MultipartFile.fromPath(
'images[]', // <-- must match your backend field name
'images[]',
file.path,
filename: path.basename(file.path),
);
......@@ -205,7 +213,7 @@ class HelpAndEnquiryProvider extends ChangeNotifier {
message: response?.message ?? "Message sent successfully!",
);
// Refresh the chat after sending message
// here it not refressing the chat screen when msg submit
if (context.mounted) {
fetchTicketChatDisplay(
sessionId: sessionId,
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment