Migration from 9.3.x to 9.4.0 - infobip/mobile-messaging-flutter-plugin GitHub Wiki
Migration from 9.3.x to 9.4.0
Changes for the In-app chat
Removed:
The following customization property has been removed:
| Removed Property | Migration |
|---|---|
networkErrorIconVisible |
Icon is now always shown if provided. Remove this property from your ChatCustomization. |
Before:
ChatCustomization(
networkErrorIcon: 'path/to/icon.png',
networkErrorIconVisible: true, // This property is no longer supported
// ... other properties
)
After:
ChatCustomization(
networkErrorIcon: 'path/to/icon.png', // Icon will be shown automatically if provided
// ... other properties
)
New:
New customization properties have been added for better error handling control:
Full Screen Error styling (displayed when chat fails to load completely):
| New Property | Description | Platform |
|---|---|---|
chatFullScreenErrorTitleText |
Main error title text | Both |
chatFullScreenErrorTitleTextColor |
Error title text color | Both |
chatFullScreenErrorTitleTextAppearance |
Text appearance for error title | Both |
chatFullScreenErrorDescriptionText |
Error description text | Both |
chatFullScreenErrorDescriptionTextColor |
Error description text color | Both |
chatFullScreenErrorDescriptionTextAppearance |
Text appearance for error description | Both |
chatFullScreenErrorBackgroundColor |
Error screen background color | Both |
chatFullScreenErrorIcon |
Icon resource displayed on error screen | Both |
chatFullScreenErrorIconTint |
Tint color of error icon | Both |
chatFullScreenErrorRefreshButtonText |
Text for the retry/refresh button | Both |
chatFullScreenErrorRefreshButtonTextColor |
Refresh button text color | Both |
chatFullScreenErrorRefreshButtonVisible |
Whether refresh button is visible | Both |
Chat Error Banner styling (displayed for chat operation errors like message send failures):
| New Property | Description | Platform |
|---|---|---|
chatBannerErrorTextColor |
Text color for chat error banner | Both |
chatBannerErrorTextAppearance |
Text appearance for chat error banner | Both |
chatBannerErrorBackgroundColor |
Background color for chat error banner | Both |
chatBannerErrorIcon |
Icon resource for chat error banner | Android |
chatBannerErrorIconTint |
Icon tint color for chat error banner | Android |
Example:
ChatCustomization(
// Network connection error (when internet is lost)
networkErrorText: 'No internet connection',
networkErrorTextColor: '#FFFFFF',
networkErrorLabelBackgroundColor: '#000000',
// Chat operation errors (message send failures, API errors, etc.)
chatBannerErrorTextColor: '#FFFFFF',
chatBannerErrorBackgroundColor: '#FF5722',
chatBannerErrorIcon: 'path/to/error_icon.png',
chatBannerErrorIconTint: '#FFFFFF',
// Full screen error (when chat fails to load completely)
chatFullScreenErrorTitleText: 'Something went wrong',
chatFullScreenErrorTitleTextColor: '#000000',
chatFullScreenErrorDescriptionText: 'Try again later or contact support',
chatFullScreenErrorDescriptionTextColor: '#666666',
chatFullScreenErrorBackgroundColor: '#FFFFFF',
chatFullScreenErrorIcon: 'path/to/full_error_icon.png',
chatFullScreenErrorRefreshButtonText: 'Try Again',
chatFullScreenErrorRefreshButtonTextColor: '#000000',
chatFullScreenErrorRefreshButtonVisible: true,
// ... other properties
)
Error types clarification
The In-app chat now explicitly displays three types of errors:
- Full Screen Error - Shown when chat fails to load completely (always displayed, can only customize appearance)
- Network Connection Error - Banner shown when device loses internet connectivity
- Chat Error Banner - Banner shown for chat operation errors (new distinct styling)
For more details, see the Handle chat errors section.