|
|
@ -1,4 +1,9 @@
|
|
|
|
|
|
|
|
import 'package:akuCommunity/constants/api.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/model/community/event_item_model.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/ui/community/community_views/widgets/chat_card.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class NewCommunityView extends StatefulWidget {
|
|
|
|
class NewCommunityView extends StatefulWidget {
|
|
|
|
NewCommunityView({Key key}) : super(key: key);
|
|
|
|
NewCommunityView({Key key}) : super(key: key);
|
|
|
@ -9,10 +14,39 @@ class NewCommunityView extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
|
|
class _NewCommunityViewState extends State<NewCommunityView>
|
|
|
|
class _NewCommunityViewState extends State<NewCommunityView>
|
|
|
|
with AutomaticKeepAliveClientMixin {
|
|
|
|
with AutomaticKeepAliveClientMixin {
|
|
|
|
|
|
|
|
EasyRefreshController _refreshController = EasyRefreshController();
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void dispose() {
|
|
|
|
|
|
|
|
_refreshController?.dispose();
|
|
|
|
|
|
|
|
super.dispose();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
super.build(context);
|
|
|
|
super.build(context);
|
|
|
|
return Container();
|
|
|
|
return BeeListView(
|
|
|
|
|
|
|
|
path: API.community.newEventList,
|
|
|
|
|
|
|
|
controller: _refreshController,
|
|
|
|
|
|
|
|
convert: (model) {
|
|
|
|
|
|
|
|
return model.tableList.map((e) => EventItemModel.fromJson(e)).toList();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
builder: (items) {
|
|
|
|
|
|
|
|
return ListView.builder(
|
|
|
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
final item = items[index] as EventItemModel;
|
|
|
|
|
|
|
|
return ChatCard(
|
|
|
|
|
|
|
|
name: item.createName ?? '',
|
|
|
|
|
|
|
|
title: item.gambitTitle ?? '',
|
|
|
|
|
|
|
|
contentImg: item.imgUrls,
|
|
|
|
|
|
|
|
date: item.date,
|
|
|
|
|
|
|
|
id: item.id,
|
|
|
|
|
|
|
|
headImg: item.headSculptureImgUrl,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemCount: items.length,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|