Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@melodysdreamj
Copy link
Contributor

Thanks a lot for contributing!

Provide a description of your changes below

The dart:io package is not supported on the web, and because of this, it is marked as not supported for web on pub.dev. Therefore, dart:io is conditionally used only in non-web environments, and in web environments, it is replaced with suitable alternative code.

Copy link
Owner

@Frezyx Frezyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @melodysdreamj !
Thanks a lot for this contribution, but please fix review issues

Comment on lines 14 to 15
_output = output ??
(String message) => message.split('\n').forEach(stdout.writeln);
Copy link
Owner

@Frezyx Frezyx Mar 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference between logger_io and logger_web is in this line
Please make outout_io.dart and output_web.dart files with output(String message) method realizations

We can't make two almost identical files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Frezyx

As you mentioned, I've added only the changes to the two files and preserved most of the original code. The modified code runs well on both web and Android, but on Android, stdout.writeln did not work, so I changed it to print. Thank you.

@melodysdreamj melodysdreamj requested a review from Frezyx March 1, 2024 15:25
Comment on lines 2 to 3

void outputLog(String message) => message.split('\n').forEach(print); No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use stdout.writeln here
print method used in TalkerFlutter.init() method from talker_flutter lib

https://github.com/Frezyx/talker/blob/master/packages/talker_flutter/lib/src/extensions/talker_flutter.dart

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your kind guidance. As you suggested, I've changed "print" to "stdout.writeln". Thank you.

@melodysdreamj melodysdreamj requested a review from Frezyx March 2, 2024 21:30
@Frezyx Frezyx merged commit e906512 into Frezyx:master Mar 4, 2024
@Frezyx
Copy link
Owner

Frezyx commented Mar 4, 2024

@melodysdreamj Thank you for this great contribution! ❤️
I will make new release version soon

@melodysdreamj
Copy link
Contributor Author

melodysdreamj commented Mar 4, 2024

@Frezyx Thank you for your kind help 🙏

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

Successfully merging this pull request may close these issues.

2 participants