You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
971 B

4 years ago
import 'package:flutter/material.dart';
class MessageNotification extends StatelessWidget {
//
3 years ago
final VoidCallback? onReply;
final String? avatar;
final String? nickname;
final String? content;
4 years ago
const MessageNotification({
3 years ago
Key? key,
4 years ago
@required this.onReply,
@required this.avatar,
@required this.nickname,
@required this.content,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Card(
margin: const EdgeInsets.symmetric(horizontal: 4),
child: SafeArea(
child: ListTile(
leading: SizedBox.fromSize(
size: const Size(40, 40),
3 years ago
child: ClipOval(child: Image.network(avatar!))),
title: Text(nickname!),
subtitle: Text(content!),
4 years ago
trailing: IconButton(
icon: Icon(Icons.reply),
onPressed: () {
3 years ago
if (onReply != null) onReply!();
4 years ago
}),
),
),
);
}
}