|
|
|
|
@ -21,6 +21,8 @@ import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart'
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
class ChatHomeScreen extends StatefulWidget {
|
|
|
|
|
const ChatHomeScreen({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<ChatHomeScreen> createState() => _ChatHomeScreenState();
|
|
|
|
|
}
|
|
|
|
|
@ -48,7 +50,7 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
|
|
|
|
|
body: Consumer<ChatProviderModel>(
|
|
|
|
|
builder: (BuildContext context, ChatProviderModel m, Widget? child) {
|
|
|
|
|
return m.isLoading
|
|
|
|
|
? ChatHomeShimmer()
|
|
|
|
|
? ChatHomeShimmer(isDetailedScreen: false,)
|
|
|
|
|
: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
TextField(
|
|
|
|
|
@ -84,7 +86,7 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
|
|
|
|
|
itemCount: m.searchedChats!.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const ClampingScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 80.0),
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 80.0),
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return SizedBox(
|
|
|
|
|
height: 55,
|
|
|
|
|
@ -96,8 +98,7 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 48,
|
|
|
|
|
width: 48,
|
|
|
|
|
child: Center(child: CircularProgressIndicator()),
|
|
|
|
|
),
|
|
|
|
|
).toShimmer().circle(30),
|
|
|
|
|
if (m.searchedChats![index].isImageLoaded! && m.searchedChats![index].image != null && m.searchedChats![index].image.isNotEmpty)
|
|
|
|
|
CircularAvatar(
|
|
|
|
|
radius: 20,
|
|
|
|
|
|