isNew method
Whether the resource has been created in the last 2 days
Implementation
// TODO move to api
bool isNew() {
return DateTime.now().difference(createdAt).compareTo(Duration(days: 2)) <
0;
}
Whether the resource has been created in the last 2 days
// TODO move to api
bool isNew() {
return DateTime.now().difference(createdAt).compareTo(Duration(days: 2)) <
0;
}