merge-requests/91/head
Aamir Muhammad 3 years ago
parent 6a7a24349f
commit 70ffb8afd8

@ -503,7 +503,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
dynamic contain = searchedChats!.where((ChatUser element) => element.id == targetUserId);
if (contain.isEmpty) {
searchedChats!.add(
ChatUser(id: targetUserId, userName: targetUserName, unreadMessageCount: 0, isImageLoading: false, image: null, isImageLoaded: false),
ChatUser(id: targetUserId, userName: targetUserName, unreadMessageCount: 0, isImageLoading: false, image: "", isImageLoaded: true),
);
notifyListeners();
}

@ -85,6 +85,7 @@ class _ChatHomeState extends State<ChatHome> {
onPageChanged: (int pageIndex) {
setState(() {
tabIndex = pageIndex;
});
},
children: <Widget>[

@ -50,7 +50,9 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
body: Consumer<ChatProviderModel>(
builder: (BuildContext context, ChatProviderModel m, Widget? child) {
return m.isLoading
? ChatHomeShimmer(isDetailedScreen: false,)
? ChatHomeShimmer(
isDetailedScreen: false,
)
: Column(
children: <Widget>[
TextField(
@ -99,7 +101,7 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
height: 48,
width: 48,
).toShimmer().circle(30),
if (m.searchedChats![index].isImageLoaded! && m.searchedChats![index].image != null && m.searchedChats![index].image.isNotEmpty)
if (m.searchedChats![index].isImageLoaded! && m.searchedChats![index].image.isNotEmpty)
CircularAvatar(
radius: 20,
height: 48,
@ -197,7 +199,7 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
});
},
separatorBuilder: (BuildContext context, int index) => const Divider(color: MyColors.lightGreyE5Color).paddingOnly(left: 59),
).expanded,
),
],
).paddingOnly(left: 21, right: 21);
},

Loading…
Cancel
Save