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>[ children: <Widget>[
UserAvatar( UserAvatar(
user: widget.message.user, user: widget.message.user,
onUserAvatarTap: widget.onUserAvatarTap, onTap: widget.onUserAvatarTap,
), ),
if (_isMyMessage && if (_isMyMessage &&
widget.nextMessage == null && widget.nextMessage == null &&
+4 -4
View File
@@ -9,19 +9,19 @@ class UserAvatar extends StatelessWidget {
Key key, Key key,
@required this.user, @required this.user,
this.constraints, this.constraints,
this.onUserAvatarTap, this.onTap,
}) : super(key: key); }) : super(key: key);
final User user; final User user;
final BoxConstraints constraints; final BoxConstraints constraints;
final void Function(User) onUserAvatarTap; final void Function(User) onTap;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
if (onUserAvatarTap != null) { if (onTap != null) {
onUserAvatarTap(user); onTap(user);
} }
}, },
child: ClipRRect( child: ClipRRect(