forked from shenghy/flutter_shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
details_web.dart
36 lines (34 loc) · 1.09 KB
/
details_web.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import 'package:flutter/material.dart';
import 'package:provide/provide.dart';
import '../../provide/details_info.dart';
// todo:
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class DetailsWeb extends StatelessWidget {
@override
Widget build(BuildContext context) {
var goodsDetail = Provide.value<DetailsInfoProvide>(context).goodsInfo.data.goodInfo.goodsDetail;
return Provide<DetailsInfoProvide>(
builder: (context, child, val) {
var isLeft = Provide.value<DetailsInfoProvide>(context).isLeft;
if (isLeft) {
return Container(
//
// todo: 基于第三方 lib 实现
//
child: Html(data: goodsDetail),
);
} else {
return Container(
//
// todo: 基于第三方lib 实现
//
width: ScreenUtil().setWidth(750),
padding: EdgeInsets.all(10),
alignment: Alignment.center,
child: Text('暂时没有数据'));
}
},
);
}
}