|
|
@ -1,4 +1,6 @@
|
|
|
|
// Flutter imports:
|
|
|
|
// Flutter imports:
|
|
|
|
|
|
|
|
import 'package:akuCommunity/widget/buttons/bottom_button.dart';
|
|
|
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -31,7 +33,8 @@ class ActivityDetailPage extends StatefulWidget {
|
|
|
|
class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
|
|
|
class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
|
|
|
ActivityDetailModel model;
|
|
|
|
ActivityDetailModel model;
|
|
|
|
EasyRefreshController _refreshController = EasyRefreshController();
|
|
|
|
EasyRefreshController _refreshController = EasyRefreshController();
|
|
|
|
|
|
|
|
bool get outdate =>
|
|
|
|
|
|
|
|
(model?.registEndDate ?? DateTime(0)).compareTo(DateTime.now()) == -1;
|
|
|
|
Widget get emptyWidget => Shimmer.fromColors(
|
|
|
|
Widget get emptyWidget => Shimmer.fromColors(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
@ -121,6 +124,7 @@ class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
|
|
|
child: FadeInImage.assetNetwork(
|
|
|
|
child: FadeInImage.assetNetwork(
|
|
|
|
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
|
|
|
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
|
|
|
image: e.url,
|
|
|
|
image: e.url,
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -184,6 +188,20 @@ class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
).material(color: Colors.white),
|
|
|
|
).material(color: Colors.white),
|
|
|
|
|
|
|
|
bottomNavi: outdate
|
|
|
|
|
|
|
|
? SizedBox()
|
|
|
|
|
|
|
|
: BottomButton(
|
|
|
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
|
|
|
VoidCallback cancel = BotToast.showLoading();
|
|
|
|
|
|
|
|
NetUtil().get(
|
|
|
|
|
|
|
|
API.community.signUpActivity,
|
|
|
|
|
|
|
|
params: {'activityId': widget.id},
|
|
|
|
|
|
|
|
showMessage: true,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
cancel();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: '我要报名'.text.make(),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|