|
|
|
@ -120,27 +120,35 @@ class _AgentViewState extends State<AgentView> with WidgetsBindingObserver { |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 4.w), |
|
|
|
Obx(() { |
|
|
|
final vipexptime = controller.vipExpiryTime.value; |
|
|
|
DateTime? expiry; |
|
|
|
if (vipexptime > 0) { |
|
|
|
expiry = vipexptime > 1000000000000 |
|
|
|
? DateTime.fromMillisecondsSinceEpoch(vipexptime) |
|
|
|
: DateTime.fromMillisecondsSinceEpoch( |
|
|
|
vipexptime * 1000); |
|
|
|
} |
|
|
|
final text = expiry != null |
|
|
|
? '${'expiryLabel'.tr}${DateFormat('yyyy-MM-dd').format(expiry)}' |
|
|
|
: 'notActivated'.tr; |
|
|
|
return Text( |
|
|
|
text, |
|
|
|
Text( |
|
|
|
'online'.tr, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
color: Colors.green, |
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
), |
|
|
|
); |
|
|
|
}), |
|
|
|
), |
|
|
|
// Obx(() { |
|
|
|
// final vipexptime = controller.vipExpiryTime.value; |
|
|
|
// DateTime? expiry; |
|
|
|
// if (vipexptime > 0) { |
|
|
|
// expiry = vipexptime > 1000000000000 |
|
|
|
// ? DateTime.fromMillisecondsSinceEpoch(vipexptime) |
|
|
|
// : DateTime.fromMillisecondsSinceEpoch( |
|
|
|
// vipexptime * 1000); |
|
|
|
// } |
|
|
|
// final text = expiry != null |
|
|
|
// ? '${'expiryLabel'.tr}${DateFormat('yyyy-MM-dd').format(expiry)}' |
|
|
|
// : 'notActivated'.tr; |
|
|
|
// return Text( |
|
|
|
// text, |
|
|
|
// style: TextStyle( |
|
|
|
// fontSize: 12.sp, |
|
|
|
// color: Colors.green, |
|
|
|
// fontWeight: FontWeight.w500, |
|
|
|
// ), |
|
|
|
// ); |
|
|
|
// }), |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
|
|
|