|
|
@ -1,15 +1,16 @@ |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/retrofit/data/brand_data.dart'; |
|
|
|
import 'package:huixiang/retrofit/data/brand_data.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/retrofit/data/founder.dart'; |
|
|
|
import 'package:huixiang/utils/MyPainter.dart'; |
|
|
|
import 'package:huixiang/utils/MyPainter.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class OriginInfo extends StatefulWidget { |
|
|
|
class OriginInfo extends StatefulWidget { |
|
|
|
final BrandData brandData; |
|
|
|
final Founder founder; |
|
|
|
|
|
|
|
|
|
|
|
OriginInfo(this.brandData); |
|
|
|
OriginInfo(this.founder); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
State<StatefulWidget> createState() { |
|
|
|
State<StatefulWidget> createState() { |
|
|
@ -50,9 +51,9 @@ class _OriginInfo extends State<OriginInfo> { |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
ClipOval( |
|
|
|
ClipOval( |
|
|
|
child: MImage( |
|
|
|
child: MImage( |
|
|
|
widget.brandData == null |
|
|
|
widget.founder == null |
|
|
|
? "" |
|
|
|
? "" |
|
|
|
: widget.brandData.originAvatar, |
|
|
|
: widget.founder.imgUrl, |
|
|
|
fit: BoxFit.cover, |
|
|
|
fit: BoxFit.cover, |
|
|
|
width: 60, |
|
|
|
width: 60, |
|
|
|
height: 60, |
|
|
|
height: 60, |
|
|
@ -73,9 +74,9 @@ class _OriginInfo extends State<OriginInfo> { |
|
|
|
TextSpan( |
|
|
|
TextSpan( |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
TextSpan( |
|
|
|
TextSpan( |
|
|
|
text: widget.brandData == null |
|
|
|
text: widget.founder == null |
|
|
|
? "" |
|
|
|
? "" |
|
|
|
: widget.brandData.originator, |
|
|
|
: widget.founder.name, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
@ -94,9 +95,9 @@ class _OriginInfo extends State<OriginInfo> { |
|
|
|
textDirection: TextDirection.ltr, |
|
|
|
textDirection: TextDirection.ltr, |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
widget.brandData == null |
|
|
|
widget.founder == null |
|
|
|
? "" |
|
|
|
? "" |
|
|
|
: widget.brandData.originDesc, |
|
|
|
: widget.founder.description, |
|
|
|
overflow: isShowMore |
|
|
|
overflow: isShowMore |
|
|
|
? TextOverflow.visible |
|
|
|
? TextOverflow.visible |
|
|
|
: TextOverflow.ellipsis, |
|
|
|
: TextOverflow.ellipsis, |
|
|
@ -143,78 +144,80 @@ class _OriginInfo extends State<OriginInfo> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
// InkWell( |
|
|
|
height: 40.h, |
|
|
|
// onTap: () { |
|
|
|
), |
|
|
|
// Navigator.of(context).pushNamed('/router/founder_story_page'); |
|
|
|
InkWell( |
|
|
|
// }, |
|
|
|
onTap: () { |
|
|
|
// child: Text( |
|
|
|
Navigator.of(context).pushNamed('/router/founder_story_page'); |
|
|
|
// // widget.founder == null ? "" : widget.founder.company, |
|
|
|
}, |
|
|
|
// "", |
|
|
|
child: Text( |
|
|
|
// style: TextStyle( |
|
|
|
widget.brandData == null ? "" : widget.brandData.company, |
|
|
|
// fontSize: 16.sp, |
|
|
|
style: TextStyle( |
|
|
|
// fontWeight: FontWeight.bold, |
|
|
|
fontSize: 16.sp, |
|
|
|
// color: Colors.black, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
// ), |
|
|
|
color: Colors.black, |
|
|
|
// ), |
|
|
|
), |
|
|
|
// ), |
|
|
|
), |
|
|
|
// SizedBox( |
|
|
|
), |
|
|
|
// height: 20.h, |
|
|
|
SizedBox( |
|
|
|
// ), |
|
|
|
height: 20.h, |
|
|
|
// InkWell( |
|
|
|
), |
|
|
|
// onTap: () { |
|
|
|
InkWell( |
|
|
|
// Navigator.of(context).pushNamed('/router/founder_story_page'); |
|
|
|
onTap: () { |
|
|
|
// }, |
|
|
|
Navigator.of(context).pushNamed('/router/founder_story_page'); |
|
|
|
// child: Text( |
|
|
|
}, |
|
|
|
// // widget.brandData == null ? "" : widget.brandData.companyDesc, |
|
|
|
child: Text( |
|
|
|
// "", |
|
|
|
widget.brandData == null ? "" : widget.brandData.companyDesc, |
|
|
|
// textAlign: TextAlign.justify, |
|
|
|
textAlign: TextAlign.justify, |
|
|
|
// style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
// fontSize: 12.sp, |
|
|
|
fontSize: 12.sp, |
|
|
|
// color: Color(0xFF353535), |
|
|
|
color: Color(0xFF353535), |
|
|
|
// ), |
|
|
|
|
|
|
|
// ), |
|
|
|
|
|
|
|
// ), |
|
|
|
|
|
|
|
// SizedBox( |
|
|
|
|
|
|
|
// height: 40.h, |
|
|
|
|
|
|
|
// ), |
|
|
|
|
|
|
|
// Text( |
|
|
|
|
|
|
|
// S.of(context).linian, |
|
|
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
|
|
// fontSize: 16.sp, |
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold, |
|
|
|
|
|
|
|
// color: Colors.black, |
|
|
|
|
|
|
|
// ), |
|
|
|
|
|
|
|
// ), |
|
|
|
|
|
|
|
// SizedBox( |
|
|
|
|
|
|
|
// height: 20.h, |
|
|
|
|
|
|
|
// ), |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
margin: EdgeInsets.only(top:30), |
|
|
|
|
|
|
|
child:InkWell( |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
Navigator.of(context).pushNamed('/router/founder_story_page'); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
_ideaWidget("友爱", "assets/image/icon_idea_ya.png"), |
|
|
|
|
|
|
|
_ideaWidget("纯净", "assets/image/icon_idea_cj.png"), |
|
|
|
|
|
|
|
_ideaWidget("健康", "assets/image/icon_idea_jk.png"), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
height: 18.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
_ideaWidget("有机", "assets/image/icon_idea_yj.png"), |
|
|
|
|
|
|
|
_ideaWidget("环保", "assets/image/icon_idea_hb.png"), |
|
|
|
|
|
|
|
_ideaWidget("智慧", "assets/image/icon_idea_zh.png"), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
|
|
|
|
height: 40.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).linian, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
height: 20.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
InkWell( |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
Navigator.of(context).pushNamed('/router/founder_story_page'); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
_ideaWidget("友爱", "assets/image/icon_idea_ya.png"), |
|
|
|
|
|
|
|
_ideaWidget("纯净", "assets/image/icon_idea_cj.png"), |
|
|
|
|
|
|
|
_ideaWidget("健康", "assets/image/icon_idea_jk.png"), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
height: 18.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
_ideaWidget("有机", "assets/image/icon_idea_yj.png"), |
|
|
|
|
|
|
|
_ideaWidget("环保", "assets/image/icon_idea_hb.png"), |
|
|
|
|
|
|
|
_ideaWidget("智慧", "assets/image/icon_idea_zh.png"), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|