diff --git a/lib/pages/new_private_chat/widget/expansion_list.dart b/lib/pages/new_private_chat/widget/expansion_list.dart index 360f81f093..f30e35309c 100644 --- a/lib/pages/new_private_chat/widget/expansion_list.dart +++ b/lib/pages/new_private_chat/widget/expansion_list.dart @@ -8,7 +8,6 @@ import 'package:linagora_design_flutter/colors/linagora_ref_colors.dart'; import 'package:fluffychat/domain/app_state/contact/get_contacts_state.dart'; import 'package:fluffychat/pages/new_private_chat/widget/expansion_contact_list_tile.dart'; -import 'package:fluffychat/pages/new_private_chat/widget/external_contact_widget.dart'; import 'package:fluffychat/pages/new_private_chat/widget/loading_contact_widget.dart'; import 'package:fluffychat/pages/new_private_chat/widget/no_contacts_found.dart'; import 'package:fluffychat/presentation/model/presentation_contact_success.dart'; @@ -64,8 +63,10 @@ class ExpansionList extends StatelessWidget { const SizedBox( height: 12, ), - ExternalContactWidget( - contact: success.contact, + InkWell( + child: ExpansionContactListTile( + contact: success.contact, + ), onTap: () { onExternalContactTap(context, success.contact); }, diff --git a/lib/pages/new_private_chat/widget/external_contact_widget.dart b/lib/pages/new_private_chat/widget/external_contact_widget.dart deleted file mode 100644 index b36d388747..0000000000 --- a/lib/pages/new_private_chat/widget/external_contact_widget.dart +++ /dev/null @@ -1,77 +0,0 @@ -import 'package:fluffychat/presentation/model/presentation_contact.dart'; -import 'package:flutter/material.dart'; -import 'package:linagora_design_flutter/linagora_design_flutter.dart'; - -import 'package:fluffychat/config/app_config.dart'; -import 'package:fluffychat/pages/search/recent_item_widget_style.dart'; -import 'package:fluffychat/widgets/avatar/avatar.dart'; - -class ExternalContactWidget extends StatelessWidget { - final PresentationContact contact; - final void Function() onTap; - - const ExternalContactWidget({ - required this.contact, - required this.onTap, - Key? key, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - return Material( - borderRadius: BorderRadius.circular(AppConfig.borderRadius), - clipBehavior: Clip.hardEdge, - color: Colors.transparent, - child: Padding( - padding: RecentItemStyle.paddingRecentItem, - child: Theme( - data: ThemeData( - splashColor: Colors.transparent, - highlightColor: Colors.transparent, - ), - child: ListTile( - contentPadding: const EdgeInsetsDirectional.only(end: 16), - title: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - width: RecentItemStyle.avatarSize, - child: Avatar( - name: contact.displayName, - ), - ), - const SizedBox(width: 8), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - contact.matrixId ?? "", - overflow: TextOverflow.ellipsis, - style: - Theme.of(context).textTheme.titleMedium?.copyWith( - color: Theme.of(context) - .colorScheme - .onSurfaceVariant, - ), - ), - Text( - contact.email ?? "", - overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - color: LinagoraRefColors.material().tertiary[30], - ), - ), - ], - ), - ), - Checkbox(value: false, onChanged: (_) {}) - ], - ), - onTap: onTap, - ), - ), - ), - ); - } -}