import 'package:Envelope/components/custom_circle_avatar.dart'; import 'package:flutter/material.dart'; class FriendListItem extends StatefulWidget{ final String id; final String username; final String? imagePath; const FriendListItem({ Key? key, required this.id, required this.username, this.imagePath, }) : super(key: key); @override _FriendListItemState createState() => _FriendListItemState(); } class _FriendListItemState extends State { @override Widget build(BuildContext context) { return GestureDetector( onTap: (){ }, child: Container( padding: const EdgeInsets.only(left: 16,right: 16,top: 10,bottom: 10), child: Row( children: [ Expanded( child: Row( children: [ CustomCircleAvatar( initials: widget.username[0].toUpperCase(), imagePath: widget.imagePath, ), const SizedBox(width: 16), Expanded( child: Align( alignment: Alignment.centerLeft, child: Container( color: Colors.transparent, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(widget.username, style: const TextStyle(fontSize: 16)), // Text( // widget.messageText, // style: TextStyle(fontSize: 13, // color: Colors.grey.shade600, // fontWeight: widget.isMessageRead?FontWeight.bold:FontWeight.normal // ), // ), ], ), ), ), ), ], ), ), ], ), ), ); } }