12.8 Tab 商品规格
实现步骤:
第 1 步:商品规格 视图
lib/pages/goods/product_details/widgets/tab_product.dart
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| @override Widget build(BuildContext context) { return <Widget>[ ... _buildTitle("Shipping Charge"), <Widget>[ const TextWidget.body1( "\$12.10", size: 18, weight: FontWeight.bold, ).paddingRight(AppSpace.listItem), const TextWidget.body2( "by paperfly shipment", ), ].toRow(), ...
|
fix:Tab 滑动监听
lib/pages/goods/product_details/controller.dart
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| _initData() async { await _loadCache(); await _loadProduct();
tabController = TabController(length: 3, vsync: this); tabController.addListener(() { tabIndex = tabController.index; update(['product_tab']); });
update(["product_details"]); }
|
提交代码到 git