update goods detail page

hmxc
小赖 4 years ago
parent e26b7712a0
commit 68b47e2939

@ -15,7 +15,7 @@ class GoodsCard extends StatelessWidget {
color: Colors.white,
elevation: 0,
padding: EdgeInsets.zero,
onPressed: () => Get.to(() => GoodsDetailPage()),
onPressed: () => Get.to(() => GoodsDetailPage(id: 0)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -2,8 +2,12 @@ import 'package:flutter/material.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
///
class GoodsDetailPage extends StatefulWidget {
GoodsDetailPage({Key? key}) : super(key: key);
///ID
final int id;
GoodsDetailPage({Key? key, required this.id}) : super(key: key);
@override
_GoodsDetailPageState createState() => _GoodsDetailPageState();

@ -1,6 +1,8 @@
import 'package:aku_community/ui/market/goods/goods_detail_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:waterfall_flow/waterfall_flow.dart';
import 'package:aku_community/constants/api.dart';
@ -35,7 +37,12 @@ class _GoodsTabListViewState extends State<GoodsTabListView>
),
itemBuilder: (context, index) {
final GoodsItem item = items[index];
return Text(item.title);
return MaterialButton(
onPressed: () {
Get.to(() => GoodsDetailPage(id: widget.model.id));
},
child: Text(item.title),
);
},
itemCount: items.length,
);

Loading…
Cancel
Save