logger
logger copied to clipboard
Make message argument generic
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 https://github.com/leisim/logger/issues/68#issuecomment-786637080 because solution there doesn't provide type-safety.