goods_detail.dart 876 B

12345678910111213141516171819202122232425262728
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_html/flutter_html.dart';
  3. import 'package:flutter_note/provide/goods_detail_provide.dart';
  4. class GoodsDetail extends StatelessWidget {
  5. final GoodsDetailProvide detailProvide;
  6. GoodsDetail({Key key, this.detailProvide}) : super(key: key);
  7. @override
  8. Widget build(BuildContext context) {
  9. return Builder(builder: (ctx) {
  10. var _detail = detailProvide.detail.data;
  11. return CustomScrollView(
  12. slivers: <Widget>[
  13. SliverOverlapInjector(
  14. handle: NestedScrollView.sliverOverlapAbsorberHandleFor(ctx)),
  15. // H5 详情
  16. SliverToBoxAdapter(child: Html(data: _detail.goodInfo.goodsDetail)),
  17. // 广告条
  18. SliverToBoxAdapter(
  19. child: Image.network(_detail.advertesPicture.PICTURE_ADDRESS))
  20. ],
  21. );
  22. });
  23. }
  24. }