提交 a53af941 authored 作者: yueweilu's avatar yueweilu

1、书籍评价星星没有按照评分显示

2、作者名称超长显示处理
上级 653c6632
...@@ -70,13 +70,13 @@ class BuildBook extends StatelessWidget { ...@@ -70,13 +70,13 @@ class BuildBook extends StatelessWidget {
), ),
Row( Row(
children: [ children: [
Text('¥${model.vipPrice}', Text('¥${model.vipPrice??''}',
style: TextStyle( style: TextStyle(
fontSize: 15.w, fontSize: 15.w,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: AppTheme.primary)), color: AppTheme.primary)),
Gaps.hGaps10, Gaps.hGaps10,
Text('¥${model.price}', Text('¥${model.price??''}',
style: TextStyle( style: TextStyle(
fontSize: 13.w, fontSize: 13.w,
color: Colours.c9, color: Colours.c9,
......
...@@ -31,19 +31,20 @@ class _BuildStudyState extends State<BuildStudy> { ...@@ -31,19 +31,20 @@ class _BuildStudyState extends State<BuildStudy> {
Text('/5.0',style: TextStyle(fontSize: 18.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c9),) Text('/5.0',style: TextStyle(fontSize: 18.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c9),)
], ],
), ),
widget.model.rating!=null?
AbsorbPointer( AbsorbPointer(
absorbing: true, absorbing: true,
child: CustomRating( child: CustomRating(
max: 5, max: 5,
score:widget.model.rating !=null ?double.parse(widget.model.rating!):0, score:double.parse(widget.model.rating!),
star: Star( star: Star(
progress: 7, progress: 7,
fillColor: AppTheme.primary, fillColor: AppTheme.primary,
size: 12.w, size: 12.w,
emptyColor: Colours.cE2, emptyColor: Colours.cE2,
), onRating: (double a) {}, ), onRating: (double a) {},
), ),
), ):const SizedBox(),
], ],
), ),
), ),
......
...@@ -116,9 +116,12 @@ class BookInfoPage extends StatelessWidget { ...@@ -116,9 +116,12 @@ class BookInfoPage extends StatelessWidget {
child: Text(item['name'].toString(),style: const TextStyle(fontSize: 15,height: 2.1,color: Colours.c3),), child: Text(item['name'].toString(),style: const TextStyle(fontSize: 15,height: 2.1,color: Colours.c3),),
), ),
Gaps.hGaps20, Gaps.hGaps20,
Container( Expanded(
alignment: Alignment.centerLeft, child: Container(
child: Text(item['value'].toString(),style: const TextStyle(fontSize: 15,height: 2.1,color: Colours.c9),textAlign: TextAlign.end,), // color: Colors.red,
alignment: Alignment.centerLeft,
child: Text(item['value'].toString(),style: const TextStyle(fontSize: 15,height: 2.1,color: Colours.c9),textAlign: TextAlign.end,overflow: TextOverflow.ellipsis,maxLines: 1),
),
), ),
], ],
); );
......
...@@ -85,20 +85,20 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{ ...@@ -85,20 +85,20 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
_getAds(); _getAds();
onRefresh(); onRefresh();
Map<String, dynamic> data = { // Map<String, dynamic> data = {
'types': 1, // 'types': 1,
'book_id': 175, // 'book_id': 175,
'chapter_id': 334, // 'chapter_id': 334,
'is_open': 1, // 'is_open': 1,
'color': 'blue', // 'color': 'blue',
'content': 'This is a note content', // 'content': 'This is a note content',
'upload': 0, // 'upload': 0,
'positioning': 'top', // 'positioning': 'top',
'note_content': 'This is a note', // 'note_content': 'This is a note',
'node_id': 0, // 'node_id': 0,
}; // };
//
await SqlManager.insertData(data); // await SqlManager.insertData(data);
final result = await Tools.checkCurrentNetStatus(); final result = await Tools.checkCurrentNetStatus();
// 有网络 并且是登录状态 的时候上传 笔记 // 有网络 并且是登录状态 的时候上传 笔记
......
...@@ -57,7 +57,8 @@ class LibraryCell extends StatelessWidget { ...@@ -57,7 +57,8 @@ class LibraryCell extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text(model.authors??'',style: TextStyle(fontSize: 11.w,color: Colours.c9,height: 1.5),), Expanded(child: Text(model.authors??'',style: TextStyle(fontSize: 11.w,color: Colours.c9,height: 1.5),overflow: TextOverflow.ellipsis,maxLines: 1,)),
Gaps.hGaps10,
Row( Row(
children: [ children: [
Text('${model.readNum.toString()}人读过',style: TextStyle(fontSize: 11.w,height: 1.5,color: Colours.cC7)), Text('${model.readNum.toString()}人读过',style: TextStyle(fontSize: 11.w,height: 1.5,color: Colours.cC7)),
......
...@@ -180,9 +180,9 @@ class _ReadPageState extends State<ReadPage> { ...@@ -180,9 +180,9 @@ class _ReadPageState extends State<ReadPage> {
}); });
// 监听 上一节 下一节 // 监听 上一节 下一节
controller.addJavaScriptHandler(handlerName: 'readCallBack', callback: (args){ // controller.addJavaScriptHandler(handlerName: 'readCallBack', callback: (args){
Console.log('监听 上一节 下一节------------------------------------------------$args'); // Console.log('监听 上一节 下一节------------------------------------------------$args');
}); // });
}, },
), ),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论