From c88ae78ced8351f464f0c2263952f2129e846492 Mon Sep 17 00:00:00 2001 From: Luis Pulido Date: Fri, 24 Apr 2020 09:13:02 -0400 Subject: [PATCH] renamed method to onTap --- lib/src/message_widget.dart | 2 +- lib/src/user_avatar.dart | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/message_widget.dart b/lib/src/message_widget.dart index 806a666a..5445fc59 100644 --- a/lib/src/message_widget.dart +++ b/lib/src/message_widget.dart @@ -157,7 +157,7 @@ class _MessageWidgetState extends State children: [ UserAvatar( user: widget.message.user, - onUserAvatarTap: widget.onUserAvatarTap, + onTap: widget.onUserAvatarTap, ), if (_isMyMessage && widget.nextMessage == null && diff --git a/lib/src/user_avatar.dart b/lib/src/user_avatar.dart index 94a5533d..8ea9a525 100644 --- a/lib/src/user_avatar.dart +++ b/lib/src/user_avatar.dart @@ -9,19 +9,19 @@ class UserAvatar extends StatelessWidget { Key key, @required this.user, this.constraints, - this.onUserAvatarTap, + this.onTap, }) : super(key: key); final User user; final BoxConstraints constraints; - final void Function(User) onUserAvatarTap; + final void Function(User) onTap; @override Widget build(BuildContext context) { return GestureDetector( onTap: () { - if (onUserAvatarTap != null) { - onUserAvatarTap(user); + if (onTap != null) { + onTap(user); } }, child: ClipRRect(