diff --git a/lib/pages/home/profile/chat_list/chat_list.dart b/lib/pages/home/profile/chat_list/chat_list.dart index 9afec6d..43ac7ad 100644 --- a/lib/pages/home/profile/chat_list/chat_list.dart +++ b/lib/pages/home/profile/chat_list/chat_list.dart @@ -1,6 +1,7 @@ import 'package:didvan/config/theme_data.dart'; import 'package:didvan/constants/app_icons.dart'; import 'package:didvan/models/view/app_bar_data.dart'; +import 'package:didvan/routes/routes.dart'; import 'package:didvan/widgets/didvan/badge.dart'; import 'package:didvan/widgets/didvan/divider.dart'; import 'package:didvan/widgets/didvan/scaffold.dart'; @@ -20,57 +21,64 @@ class ChatList extends StatelessWidget { text: '12', ), ), - slivers: [ - for (var i = 0; i < 10; i++) - Column( - children: [ - Row( - children: [ - const Icon( - DidvanIcons.avatar_light, - size: 32, + slivers: [for (var i = 0; i < 10; i++) _itemBuilder(context)], + ); + } + + Widget _itemBuilder(BuildContext context) { + return GestureDetector( + onTap: () => Navigator.of(context).pushNamed(Routes.chat), + child: Container( + color: Colors.transparent, + child: Column( + children: [ + Row( + children: [ + const Icon( + DidvanIcons.avatar_light, + size: 32, + ), + const SizedBox(width: 12), + Expanded( + child: DidvanText( + 'سردبیر رادار سیاسی', + style: Theme.of(context).textTheme.bodyText1, ), - const SizedBox(width: 12), - Expanded( - child: DidvanText( - 'سردبیر رادار سیاسی', - style: Theme.of(context).textTheme.bodyText1, - ), + ), + const DidvanBadge(text: '2'), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(width: 40), + const Icon( + DidvanIcons.check_double_light, + size: 16, + ), + const SizedBox(width: 4), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const DidvanText( + 'فورت فورت،تموم شد؟ خیلی تاثیرگذار بود.', + maxLines: 1, + ), + DidvanText( + '15 دقیقه پیش', + style: Theme.of(context).textTheme.caption, + color: Theme.of(context).colorScheme.caption, + ) + ], ), - const DidvanBadge(text: '2'), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox(width: 40), - const Icon( - DidvanIcons.check_double_light, - size: 16, - ), - const SizedBox(width: 4), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const DidvanText( - 'فورت فورت،تموم شد؟ خیلی تاثیرگذار بود.', - maxLines: 1, - ), - DidvanText( - '15 دقیقه پیش', - style: Theme.of(context).textTheme.caption, - color: Theme.of(context).colorScheme.caption, - ) - ], - ), - ), - ], - ), - const DidvanDivider(), - ], - ) - ], + ), + ], + ), + const DidvanDivider(), + ], + ), + ), ); } }