sendTimeFromJson static method
Implementation
static int sendTimeFromJson(dynamic milliseconds) {
if (milliseconds == null) {
return DateTime.now().millisecondsSinceEpoch;
}
if (milliseconds is String) {
return int.tryParse(milliseconds) ?? 0;
} else if (milliseconds is int) {
return milliseconds;
} else {
return int.tryParse(milliseconds) ?? 0;
}
}