-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TW-508: Keep horizontal when open context popup menu
- Loading branch information
Showing
15 changed files
with
150 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_gen/gen_l10n/l10n.dart'; | ||
|
||
enum ChatContextMenuActions { | ||
select, | ||
copyMessage, | ||
pinMessage, | ||
forward; | ||
|
||
String getTitle(BuildContext context) { | ||
switch (this) { | ||
case ChatContextMenuActions.select: | ||
return L10n.of(context)!.select; | ||
case ChatContextMenuActions.copyMessage: | ||
return L10n.of(context)!.copyMessageText; | ||
case ChatContextMenuActions.pinMessage: | ||
return L10n.of(context)!.pinMessage; | ||
case ChatContextMenuActions.forward: | ||
return L10n.of(context)!.forward; | ||
} | ||
} | ||
|
||
IconData getIcon() { | ||
switch (this) { | ||
case ChatContextMenuActions.select: | ||
return Icons.check_circle_outline; | ||
case ChatContextMenuActions.copyMessage: | ||
return Icons.content_copy; | ||
case ChatContextMenuActions.pinMessage: | ||
return Icons.push_pin; | ||
case ChatContextMenuActions.forward: | ||
return Icons.shortcut; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.