Increase the effect of switching, we are mainly amend this place
We review the content on the show
The final code
details_web.dart
import 'package:flutter/material.dart'; import 'package:provide/provide.dart'; import '../../provide/details_info.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_html/flutter_html.dart'; class DetailsWeb extends StatelessWidget { @override Widget build(BuildContext context) { var goodsDetails = Provide.value<DetailsInfoProvide>(context).goodsInfo.data.goodInfo.goodsDetail; return Provide<DetailsInfoProvide>( builder: (context,child,val){ var isLeft=Provide.value<DetailsInfoProvide>(context).isLeft; return Container ( // details page IF (isLeft) { child: the Html ( data: goodsDetails // note that this is data, rather than a child! ! ! ! ), ); } The else { return Container ( . Width: wide ScreenUtil () setWidth (750), // and the like our page padding: EdgeInsets.all (10.0), Alignment: Alignment.center, centered // child : Text ( 'no data to') ); } } ); } }
.