Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad working of toString #94

Closed
polRk opened this issue Dec 23, 2020 · 4 comments
Closed

Bad working of toString #94

polRk opened this issue Dec 23, 2020 · 4 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@polRk
Copy link

polRk commented Dec 23, 2020

My Task object

  @override
  List<Object> get props {
    return [
      id,
      createDateTime,
      updateDateTime,
      title,
      description,
      isPriority,
      status,
      dueDate,
      startDate,
      endDate,
      reminderTime,
      recurrenceRule,
      recurrenceExceptions,
      projects,
    ];
  }

  @override
  bool get stringify => true;

and

print(task);

return

TaskEntity(95c2626a-5873-42e0-b311-36fc52db667c, 2020-12-23 18:12:06.547637, 2020-12-23 18:12:06.632105, ..., [], [])

Expected behavior
Show full record with sub records

Version
latest

@polRk
Copy link
Author

polRk commented Dec 23, 2020

Don't use .map function, use + instead
'$runtimeType${props?.map((prop) => prop?.toString() ?? '') ?? '()'}';

@polRk
Copy link
Author

polRk commented Dec 24, 2020

See my PR #95

@felangel
Copy link
Owner

felangel commented Jan 6, 2021

Hi @polRk 👋
Thanks for opening an issue!

I don't believe this is an issue with Equatable. I think this is related to flutter/flutter#22665. If you still believe this is an Equatable-specific issue can you please provide a test-case which fails with the current implementation and succeeds with the proposed changes? Thanks 👍

@felangel felangel self-assigned this Jan 6, 2021
@felangel felangel added question Further information is requested waiting for response Waiting for follow up labels Jan 6, 2021
@felangel felangel added investigating Investigating a reported issue and removed waiting for response Waiting for follow up labels Feb 6, 2021
@felangel
Copy link
Owner

felangel commented Feb 8, 2021

Closing as this was fixed in #97 and published in v1.2.6 👍

@felangel felangel closed this as completed Feb 8, 2021
@felangel felangel added bug Something isn't working and removed investigating Investigating a reported issue question Further information is requested labels Feb 8, 2021
@felangel felangel added this to Done in equatable Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
equatable
  
Done
Development

No branches or pull requests

2 participants