Skip to content

Conversation

@dhyash-simform
Copy link
Collaborator

Description

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs: etc).
  • I have followed the [Contributor Guide] when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

@dhyash-simform dhyash-simform force-pushed the feat/chat_list_context_menu branch 3 times, most recently from 4be707d to 1fe99d4 Compare August 1, 2025 10:44
@dhyash-simform dhyash-simform force-pushed the feat/chat_list_context_menu branch from 1fe99d4 to 2525059 Compare August 13, 2025 09:58
Comment on lines 59 to 66
Future.delayed(
// Call this after the animation of menu is completed
// To show the pin status change animation
const Duration(milliseconds: 800),
() {
_chatListController?.removeChat(chat.id);
},
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be rather a callback provided to the user. Also, separately allow user to change the duration.

loadMoreChats: () async =>
await Future.delayed(const Duration(seconds: 2)),
menuConfig: ChatMenuConfig(
enabled: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be default value.

Comment on lines 53 to 59
final StatusTrailingIcon<MuteStatus>? muteStatusTrailingIcon;

/// Custom trailing icon for pin status menu item.
final StatusTrailingIcon<PinStatus>? pinStatusTrailingIcon;

/// Custom trailing icon for delete menu item.
final IconData? deleteTrailingIcon;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop the trailing word in these.

final MenuActionBuilder? actions;

/// Custom menu builder to create the context menu.
final MenuBuilderCallback? menuBuilder;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop the menu prefix here.


@override
Widget build(BuildContext context) {
if (!config.enabled) return child;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This widget shouldn't be included in the widget tree if its disabled.

Comment on lines 29 to 32
final newMuteStatus = switch (chat.settings.muteStatus) {
MuteStatus.muted => MuteStatus.unmute,
MuteStatus.unmute => MuteStatus.muted,
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can convert this to a method named toggle in the enum itself.


final actions = <Widget>[
...?config.actions?.call(chat),
if (config.muteStatusCallback != null)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can utilise if case here.

/// Defaults to `ScrollViewKeyboardDismissBehavior.onDrag`.
final ScrollViewKeyboardDismissBehavior? scrollViewKeyboardDismissBehavior;

/// Callback to provide a widget for the menu in the chat list.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems incorrect.

@dhyash-simform dhyash-simform force-pushed the feat/chat_list_context_menu branch from 2525059 to fe407e4 Compare August 19, 2025 06:40
@dhyash-simform dhyash-simform changed the base branch from main to feat/chat_list_ui_base August 20, 2025 08:16
@dhyash-simform dhyash-simform force-pushed the feat/chat_list_context_menu branch from fe407e4 to c9e32bb Compare August 20, 2025 09:43
@aditya-css aditya-css merged commit c0a1c28 into feat/chat_list_ui_base Aug 20, 2025
1 check passed
@aditya-css aditya-css deleted the feat/chat_list_context_menu branch August 20, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants