Skip to content

Commit

Permalink
refactor: 🔨 update onTap callback in ImageMessageConfiguration to use…
Browse files Browse the repository at this point in the history
… message object instead of image URL
  • Loading branch information
vatsaltanna committed Oct 31, 2024
1 parent 220f4a8 commit 3305260
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [2.2.1]
## [2.3.0]

* **Breaking**: [257](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/issues/257) update
onTap callback in ImageMessageConfiguration to use message object instead of image URL
* **Fix**: [254](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/issues/254) Outgoing
Message Alignment
* **Fix**: [266](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/pull/266) Update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ImageMessageConfiguration {
final bool hideShareIcon;

/// Provides callback when user taps on image message.
final StringCallback? onTap;
final MessageCallBack? onTap;

/// Used for giving height of image message.
final double? height;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/image_message_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ImageMessageView extends StatelessWidget {
children: [
GestureDetector(
onTap: () => imageMessageConfig?.onTap != null
? imageMessageConfig?.onTap!(imageUrl)
? imageMessageConfig?.onTap!(message)
: null,
child: Transform.scale(
scale: highlightImage ? highlightScale : 1.0,
Expand Down

0 comments on commit 3305260

Please sign in to comment.