parent
8748a649a1
commit
8b6c650d9f
@ -1,69 +1,83 @@
|
|||||||
import 'package:aku_new_community/const/resource.dart';
|
|
||||||
import 'package:aku_new_community/constants/api.dart';
|
|
||||||
import 'package:aku_new_community/constants/saas_api.dart';
|
import 'package:aku_new_community/constants/saas_api.dart';
|
||||||
import 'package:aku_new_community/model/common/img_model.dart';
|
import 'package:aku_new_community/model/common/img_model.dart';
|
||||||
import 'package:aku_new_community/model/community/activity_people_model.dart';
|
|
||||||
import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart';
|
import 'package:aku_new_community/models/home/activity_detail_model.dart';
|
||||||
|
|
||||||
import 'package:aku_new_community/utils/headers.dart';
|
import 'package:aku_new_community/utils/headers.dart';
|
||||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
|
|
||||||
class ActivityPeopleListPage extends StatefulWidget {
|
class ActivityPeopleListPage extends StatefulWidget {
|
||||||
final int? id;
|
final List<Registration>? registrationList;
|
||||||
|
|
||||||
ActivityPeopleListPage({Key? key, required this.id}) : super(key: key);
|
ActivityPeopleListPage({Key? key, required this.registrationList}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ActivityPeopleListPageState createState() => _ActivityPeopleListPageState();
|
_ActivityPeopleListPageState createState() => _ActivityPeopleListPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ActivityPeopleListPageState extends State<ActivityPeopleListPage> {
|
class _ActivityPeopleListPageState extends State<ActivityPeopleListPage> {
|
||||||
EasyRefreshController _refreshController = EasyRefreshController();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_refreshController.dispose();
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BeeScaffold(
|
return BeeScaffold(
|
||||||
title: '参与人员',
|
title: '报名人员列表',
|
||||||
body: BeeListView<ActivityPeopleModel>(
|
body:
|
||||||
controller: _refreshController,
|
Column(
|
||||||
path: API.community.activityPeopleList,
|
|
||||||
extraParams: {'activityId': widget.id},
|
children: [
|
||||||
convert: (model) =>
|
Container(
|
||||||
model.rows.map((e) => ActivityPeopleModel.fromJson(e)).toList(),
|
color: Colors.black.withOpacity(0.06),
|
||||||
builder: (items) {
|
height: 75.w,
|
||||||
return ListView.separated(
|
width: double.infinity,
|
||||||
|
child: '已有'.richText.color(Colors.black.withOpacity(0.65)).size(28.sp).withTextSpanChildren([
|
||||||
|
widget.registrationList==null?''.textSpan
|
||||||
|
.size(28.sp)
|
||||||
|
.color(Color(0xFFFA5858))
|
||||||
|
.make(): '${widget.registrationList!.length}'
|
||||||
|
.textSpan
|
||||||
|
.size(28.sp)
|
||||||
|
.color(Color(0xFFFA5858))
|
||||||
|
.make(),
|
||||||
|
'人报名参加本次活动'.textSpan.size(28.sp).color(Colors.black.withOpacity(0.65)).make(),
|
||||||
|
]).make(),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
widget.registrationList!=null?
|
||||||
|
ListView.separated(
|
||||||
padding: EdgeInsets.all(32.w),
|
padding: EdgeInsets.all(32.w),
|
||||||
|
shrinkWrap: true,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final ActivityPeopleModel model = items[index];
|
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
96.hb,
|
96.hb,
|
||||||
20.wb,
|
20.wb,
|
||||||
FadeInImage.assetNetwork(
|
FadeInImage.assetNetwork(
|
||||||
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||||
image: SAASAPI.image(ImgModel.first(model.imgUrl)),
|
image: SAASAPI.image(ImgModel.first(widget.registrationList![index].avatarImgList)),
|
||||||
height: 60.w,
|
height: 60.w,
|
||||||
width: 60.w,
|
width: 60.w,
|
||||||
),
|
),
|
||||||
18.wb,
|
18.wb,
|
||||||
model.name!.text.size(28.sp).make(),
|
widget.registrationList![index].name.text.size(28.sp).make(),
|
||||||
Spacer(),
|
|
||||||
model.tel!.text.size(28.sp).make(),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
separatorBuilder: (_, __) => Divider(height: 1.w),
|
separatorBuilder: (_, __) => Divider(height: 1.w),
|
||||||
itemCount: items.length,
|
itemCount: widget.registrationList!.length,
|
||||||
);
|
):SizedBox(),
|
||||||
},
|
],
|
||||||
).material(color: Colors.white),
|
)
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue