chat_list.dart 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // import 'package:e2ee_chat/common/global.dart';
  2. // import 'package:e2ee_chat/presenter/chat_list.dart';
  3. // import 'package:e2ee_chat/widgets/chat_list_item.dart';
  4. // import 'package:flutter/material.dart';
  5. // import 'package:flutter_slidable/flutter_slidable.dart';
  6. // import 'package:provider/provider.dart';
  7. //
  8. // class ChatList extends StatefulWidget {
  9. // @override
  10. // _ChatListState createState() => _ChatListState();
  11. // }
  12. //
  13. // class _ChatListState extends State<ChatList> {
  14. // @override
  15. // Widget build(BuildContext context) {
  16. // return ChangeNotifierProvider<ChatListPresenter>(
  17. // create: (context) {
  18. // return ChatListPresenter();
  19. // },
  20. // child: Builder(
  21. // builder: (context) {
  22. // final provider = Provider.of<ChatListPresenter>(context);
  23. // final list = provider.chatList;
  24. // return RefreshIndicator(
  25. // child: ListView.builder(
  26. // itemCount: list.length,
  27. // itemBuilder: (context, index) {
  28. // final _item = list[index];
  29. // return Slidable(
  30. // actionPane: SlidableDrawerActionPane(),
  31. // actionExtentRatio: 0.25,
  32. // secondaryActions: <Widget>[
  33. // IconSlideAction(
  34. // caption: '取消置顶',
  35. // color: Colors.black45,
  36. // icon: Icons.more_horiz,
  37. // onTap: () {},
  38. // ),
  39. // IconSlideAction(
  40. // caption: '删除',
  41. // color: Colors.redAccent,
  42. // icon: Icons.delete,
  43. // onTap: () => {},
  44. // ),
  45. // ],
  46. // child: Padding(
  47. // padding: EdgeInsets.only(left: 36, bottom: 20, top: 20),
  48. // child: Row(
  49. // crossAxisAlignment: CrossAxisAlignment.start,
  50. // children: <Widget>[
  51. // Expanded(child: ChatListItem(_item)),
  52. // _item.isStick
  53. // ? Container(
  54. // width: 40,
  55. // height: 48,
  56. // margin: EdgeInsets.only(top: 10, right: 10),
  57. // child: Icon(Icons.star))
  58. // : Padding(
  59. // padding: EdgeInsets.symmetric(horizontal: 24),
  60. // )
  61. // ],
  62. // ),
  63. // ),
  64. // );
  65. // }),
  66. // onRefresh: () async {});
  67. // },
  68. // ),
  69. // );
  70. // }
  71. // }