Encrypted messaging app
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.

56 lines
3.2 KiB

  1. import 'package:flutter/material.dart';
  2. class FriendListItem extends StatefulWidget{
  3. final String id;
  4. final String username;
  5. const FriendListItem({
  6. Key? key,
  7. required this.id,
  8. required this.username,
  9. }) : super(key: key);
  10. @override
  11. _FriendListItemState createState() => _FriendListItemState();
  12. }
  13. class _FriendListItemState extends State<FriendListItem> {
  14. @override
  15. Widget build(BuildContext context) {
  16. return GestureDetector(
  17. onTap: (){
  18. },
  19. child: Container(
  20. padding: const EdgeInsets.only(left: 16,right: 16,top: 10,bottom: 10),
  21. child: Row(
  22. children: <Widget>[
  23. Expanded(
  24. child: Row(
  25. children: <Widget>[
  26. // CircleAvatar(
  27. // backgroundImage: NetworkImage(widget.imageUrl),
  28. // maxRadius: 30,
  29. // ),
  30. //const SizedBox(width: 16),
  31. Expanded(
  32. child: Container(
  33. color: Colors.transparent,
  34. child: Column(
  35. crossAxisAlignment: CrossAxisAlignment.start,
  36. children: <Widget>[
  37. Text(widget.username, style: const TextStyle(fontSize: 16)),
  38. const SizedBox(height: 6),
  39. //Text(widget.messageText,style: TextStyle(fontSize: 13,color: Colors.grey.shade600, fontWeight: widget.isMessageRead?FontWeight.bold:FontWeight.normal),),
  40. const Divider(),
  41. ],
  42. ),
  43. ),
  44. ),
  45. ],
  46. ),
  47. ),
  48. ],
  49. ),
  50. ),
  51. );
  52. }
  53. }