|
|
|
@ -92,58 +92,60 @@ class _FeaturedActivity extends State<FeaturedActivity> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
if (activityList != null && activityList.length > 1) |
|
|
|
|
Container( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pushNamed('/router/web_page', |
|
|
|
|
arguments: {"activityId": activityList[1].id}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
child: stackItem(12.sp, activityList[1]), |
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 5.w), |
|
|
|
|
width: (MediaQuery.of(context).size.width - 42) / 2, |
|
|
|
|
height: 190.h / 2, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
|
color: Colors.green, |
|
|
|
|
image: DecorationImage( |
|
|
|
|
image: NetworkImage( |
|
|
|
|
activityList[1].coverImg, |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pushNamed('/router/web_page', |
|
|
|
|
arguments: {"activityId": activityList[1].id}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
child: stackItem(12.sp, activityList[1]), |
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 5.w), |
|
|
|
|
width: (MediaQuery.of(context).size.width - 42) / 2, |
|
|
|
|
height: 190.h / 2, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
|
color: Colors.green, |
|
|
|
|
image: DecorationImage( |
|
|
|
|
image: NetworkImage( |
|
|
|
|
activityList[1].coverImg, |
|
|
|
|
), |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 5, |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pushNamed('/router/web_page', |
|
|
|
|
arguments: {"activityId": activityList[2].id}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
child: stackItem(12.sp, activityList[2]), |
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 5.w), |
|
|
|
|
width: (MediaQuery.of(context).size.width - 42) / 2, |
|
|
|
|
height: 190.h / 2, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
|
color: Colors.blue, |
|
|
|
|
image: DecorationImage( |
|
|
|
|
image: NetworkImage( |
|
|
|
|
activityList[2].coverImg, |
|
|
|
|
SizedBox( |
|
|
|
|
height: 5, |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pushNamed('/router/web_page', |
|
|
|
|
arguments: {"activityId": activityList[2].id}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
child: stackItem(12.sp, activityList[2]), |
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 5.w), |
|
|
|
|
width: (MediaQuery.of(context).size.width - 42) / 2, |
|
|
|
|
height: 190.h / 2, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
|
color: Colors.blue, |
|
|
|
|
image: DecorationImage( |
|
|
|
|
image: NetworkImage( |
|
|
|
|
activityList[2].coverImg, |
|
|
|
|
), |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
@ -157,72 +159,74 @@ class _FeaturedActivity extends State<FeaturedActivity> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget stackItem(double textSize, Activity activity) { |
|
|
|
|
return Container(color: Color.fromARGB(80, 0, 0, 0),child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(left: 8, top: 8), |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
activity.mainTitle, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
maxLines: 1, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: textSize, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
return Container( |
|
|
|
|
color: Color.fromARGB(80, 0, 0, 0), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(left: 8, top: 8), |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
activity.mainTitle, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
maxLines: 1, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: textSize, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 2, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
activity?.viceTitle ?? "", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 2, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: 58.w, |
|
|
|
|
margin: EdgeInsets.only(left: 8, bottom: 8), |
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
vertical: 4.h, |
|
|
|
|
horizontal: 8.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
activity?.viceTitle??"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
borderRadius: BorderRadius.circular(20), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: 58.w, |
|
|
|
|
margin: EdgeInsets.only(left: 8, bottom: 8), |
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
vertical: 4.h, |
|
|
|
|
horizontal: 8.w, |
|
|
|
|
), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
borderRadius: BorderRadius.circular(20), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
"了解", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Icon( |
|
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
|
color: Colors.white, |
|
|
|
|
size: 12, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
"了解", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Icon( |
|
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
|
color: Colors.white, |
|
|
|
|
size: 12, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
)); |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|