renamed method to onTap
This commit is contained in:
@@ -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 &&
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user