import 'package:Envelope/components/custom_circle_avatar.dart';
|
|
import 'package:Envelope/models/friends.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class FriendListItem extends StatefulWidget{
|
|
final Friend friend;
|
|
const FriendListItem({
|
|
Key? key,
|
|
required this.friend,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
_FriendListItemState createState() => _FriendListItemState();
|
|
}
|
|
|
|
class _FriendListItemState extends State<FriendListItem> {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
behavior: HitTestBehavior.opaque,
|
|
onTap: () async {
|
|
},
|
|
child: Container(
|
|
padding: const EdgeInsets.only(left: 16,right: 16,top: 10,bottom: 10),
|
|
child: Row(
|
|
children: <Widget>[
|
|
Expanded(
|
|
child: Row(
|
|
children: <Widget>[
|
|
CustomCircleAvatar(
|
|
initials: widget.friend.username[0].toUpperCase(),
|
|
imagePath: null,
|
|
),
|
|
const SizedBox(width: 16),
|
|
Expanded(
|
|
child: Align(
|
|
alignment: Alignment.centerLeft,
|
|
child: Container(
|
|
color: Colors.transparent,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Text(widget.friend.username, style: const TextStyle(fontSize: 16)),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|