|
|
@ -45,6 +45,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver { |
|
|
|
bool isShowImg = true; |
|
|
|
bool isShowImg = true; |
|
|
|
int chapterIndex = 0; |
|
|
|
int chapterIndex = 0; |
|
|
|
double height = 0; |
|
|
|
double height = 0; |
|
|
|
|
|
|
|
var isShowMore = false; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
void initState() { |
|
|
@ -179,7 +180,6 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
height: 123, |
|
|
|
|
|
|
|
margin: EdgeInsets.only(bottom: 16.h), |
|
|
|
margin: EdgeInsets.only(bottom: 16.h), |
|
|
|
padding: EdgeInsets.only(left: 16, top: 16, right: 10), |
|
|
|
padding: EdgeInsets.only(left: 16, top: 16, right: 10), |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
@ -290,14 +290,47 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver { |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
course != null ? course.introduce : "", |
|
|
|
course != null ? course.introduce : "", |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
overflow: isShowMore |
|
|
|
maxLines: 2, |
|
|
|
? TextOverflow.visible |
|
|
|
|
|
|
|
: TextOverflow.ellipsis, |
|
|
|
|
|
|
|
maxLines: isShowMore ? 10 : 2, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox(height: 3.h), |
|
|
|
|
|
|
|
GestureDetector( |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
isShowMore = !isShowMore; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.max, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).gengduo, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
fontSize: 12.sp, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
color: Colors.black, |
|
|
|
color: Colors.black, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
Icon( |
|
|
|
|
|
|
|
(isShowMore != null && !isShowMore) |
|
|
|
|
|
|
|
? Icons.chevron_right |
|
|
|
|
|
|
|
: Icons.keyboard_arrow_up, |
|
|
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
|
|
size: 18, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox(height: 3.h), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|