hmxc
小赖 4 years ago
parent 524bcc1610
commit a2b2e4e691

@ -28,7 +28,7 @@ class BorrowGoodsDetailPage extends StatefulWidget {
class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
EasyRefreshController? _easyRefreshController;
late List<ArticleBorrowDetailModel> _models;
List<ArticleBorrowDetailModel> _models = [];
bool _onload = true;
List<int?>? _selectItems = [];
bool get allSelect => _selectItems!.length == _models.length;
@ -54,13 +54,13 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
body: EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
onRefresh: () async {
List models = await (getModels());
_models =
models.map((e) => ArticleBorrowDetailModel.fromJson(e)).toList();
_onload = false;
setState(() {});
},
// onRefresh: () async {
// List<dynamic> models = await (getModels());
// _models =
// models.map((e) => ArticleBorrowDetailModel.fromJson(e)).toList();
// _onload = false;
// setState(() {});
// },
child: _onload
? _empty()
: ListView(
@ -155,7 +155,7 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
}
Widget _empty() {
return Container();
return ListView();
}
Future getModels() async {

@ -194,7 +194,7 @@ class _BorrowGoodsPageState extends State<BorrowGoodsPage> {
.withRounded(value: 6.w)
.make()
.onInkTap(() async {
_receiveIds!.forEach((element) {
_receiveIds?.forEach((element) {
_submitIds.remove(element);
});
await Get.to(() => BorrowGoodsDetailPage(
@ -204,8 +204,8 @@ class _BorrowGoodsPageState extends State<BorrowGoodsPage> {
.then((value) {
_receiveIds = value;
});
_counts[index] = _receiveIds!.length;
_submitIds.addAll(_receiveIds!);
_counts[index] = _receiveIds?.length ?? 0;
_submitIds.addAll(_receiveIds ?? []);
setState(() {});
});
}

@ -2,7 +2,7 @@ name: aku_community
description: A new Flutter project.
publish_to: "none"
version: 1.2.0-dev+37
version: 1.3.0-dev+38
environment:
sdk: ">=2.12.0 <3.0.0"

Loading…
Cancel
Save