renamed method to onTap

This commit is contained in:
Luis Pulido
2020-04-24 09:13:02 -04:00
parent c5ba6dc390
commit c88ae78ced
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ class _MessageWidgetState extends State<MessageWidget>
children: <Widget>[
UserAvatar(
user: widget.message.user,
onUserAvatarTap: widget.onUserAvatarTap,
onTap: widget.onUserAvatarTap,
),
if (_isMyMessage &&
widget.nextMessage == null &&
+4 -4
View File
@@ -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(