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

Make message argument generic #107

Open
0ttik opened this issue Aug 12, 2021 · 0 comments
Open

Make message argument generic #107

0ttik opened this issue Aug 12, 2021 · 0 comments

Comments

@0ttik
Copy link

0ttik commented Aug 12, 2021

E.g.

final logger = Logger<MyMessage>();
logger.i(MyMessage("I'm potato", tag: Tag.potato));

class MyMessage {
  final dynamic message;
  final Tag? tag;
  ...
}

enum Tag {potato, nonPotato}

I think this also compliments this #68 (comment) because solution there doesn't provide type-safety.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant