|
|
@ -41,7 +41,6 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
int tempHour = 0; |
|
|
|
int tempHour = 0; |
|
|
|
int tempM = 0; |
|
|
|
int tempM = 0; |
|
|
|
int tempS = 0; |
|
|
|
int tempS = 0; |
|
|
|
int limitNumber = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void dispose() { |
|
|
|
void dispose() { |
|
|
@ -58,7 +57,6 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
void initState() { |
|
|
|
void initState() { |
|
|
|
super.initState(); |
|
|
|
super.initState(); |
|
|
|
actRecordId = widget.arguments["actRecordId"]; |
|
|
|
actRecordId = widget.arguments["actRecordId"]; |
|
|
|
limitNumber = widget.arguments["limitNumber"]; |
|
|
|
|
|
|
|
startCountdownTimer(); |
|
|
|
startCountdownTimer(); |
|
|
|
SharedPreferences.getInstance().then((value) { |
|
|
|
SharedPreferences.getInstance().then((value) { |
|
|
|
String minToken = value.getString("minToken"); |
|
|
|
String minToken = value.getString("minToken"); |
|
|
@ -287,7 +285,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) || tempDay == 0) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) || tempDay == 0) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
tempDay.toString(), |
|
|
|
tempDay.toString(), |
|
|
@ -307,7 +305,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
fontSize: 16.sp, |
|
|
|
fontSize: 16.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0 ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
)), |
|
|
|
], |
|
|
|
], |
|
|
@ -320,7 +318,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) |
|
|
|
color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) |
|
|
|
? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
@ -341,7 +339,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
fontSize: 16.sp, |
|
|
|
fontSize: 16.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
)), |
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
@ -352,7 +350,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
tempM.toString(), |
|
|
|
tempM.toString(), |
|
|
@ -372,7 +370,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
fontSize: 16.sp, |
|
|
|
fontSize: 16.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
)), |
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
@ -383,7 +381,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
// color: Color(0xFFD2D2D2), |
|
|
|
color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
borderRadius: BorderRadius.circular(4)), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
tempS.toString(), |
|
|
|
tempS.toString(), |
|
|
@ -400,7 +398,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
), |
|
|
|
), |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
"恭喜您拼团成功", |
|
|
|
"恭喜您拼团成功", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
@ -409,7 +407,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
color: Colors.black, |
|
|
|
color: Colors.black, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber && tempDay != 0 && tempHour!=0 && tempM !=0 && tempS !=0) |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < (activityActRecordDetails?.successNumber ?? 0) && tempDay != 0 && tempHour!=0 && tempM !=0 && tempS !=0) |
|
|
|
Text.rich( |
|
|
|
Text.rich( |
|
|
|
TextSpan( |
|
|
|
TextSpan( |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
@ -422,7 +420,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
TextSpan( |
|
|
|
TextSpan( |
|
|
|
text:(limitNumber - (activityActRecordDetails?.actRecord?.joinNum ?? 0)).toString(), |
|
|
|
text:((activityActRecordDetails?.successNumber ?? 0) - (activityActRecordDetails?.actRecord?.joinNum ?? 0)).toString(), |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 18.sp, |
|
|
|
fontSize: 18.sp, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
@ -461,7 +459,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
padding: EdgeInsets.zero, |
|
|
|
padding: EdgeInsets.zero, |
|
|
|
scrollDirection: Axis.horizontal, |
|
|
|
scrollDirection: Axis.horizontal, |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
itemCount:limitNumber, |
|
|
|
itemCount:(activityActRecordDetails?.successNumber ?? 0), |
|
|
|
itemBuilder: (context, position) { |
|
|
|
itemBuilder: (context, position) { |
|
|
|
return GestureDetector( |
|
|
|
return GestureDetector( |
|
|
|
onTap: () {}, |
|
|
|
onTap: () {}, |
|
|
@ -473,7 +471,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height:54.h, |
|
|
|
height:54.h, |
|
|
|
), |
|
|
|
), |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) |
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -497,7 +495,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
)), |
|
|
|
), |
|
|
|
), |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber || tempDay != 0 && tempHour!=0 && tempM != 0 && tempS != 0) |
|
|
|
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < (activityActRecordDetails?.successNumber ?? 0) || tempDay != 0 && tempHour!=0 && tempM != 0 && tempS != 0) |
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -535,7 +533,7 @@ class _GroupDetails extends State<GroupDetails> { |
|
|
|
], |
|
|
|
], |
|
|
|
)), |
|
|
|
)), |
|
|
|
), |
|
|
|
), |
|
|
|
if(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) |
|
|
|
if((tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0) && ((activityActRecordDetails?.actRecord?.joinNum ?? 0) < (activityActRecordDetails?.successNumber ?? 0))) |
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|