Last active
October 12, 2024 09:08
-
-
Save gyugyu90/6982f3ec7c638543803d533a2514dcd5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Logger { | |
static final Logger _instance = Logger._internal('MyApplication'); | |
String prefix; | |
Logger._internal(this.prefix); | |
factory Logger() { | |
return _instance; | |
} | |
debug(String message) { | |
print('$prefix ::: $message'); | |
} | |
} | |
void main() { | |
Logger().debug('hello'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment