Last active
May 5, 2019 18:43
-
-
Save googlicius/91d699ceda3fc7ca8e5b6d9c29457171 to your computer and use it in GitHub Desktop.
Revisions
-
googlicius renamed this gist
May 5, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
googlicius renamed this gist
May 5, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
googlicius revised this gist
May 5, 2019 . No changes.There are no files selected for viewing
-
googlicius revised this gist
May 5, 2019 . 1 changed file with 30 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,30 @@ class Logger { final String name; bool mute = false; static final Map<String, Logger> _cache = <String, Logger>{}; factory Logger(String name) { if(_cache.containsKey(name)) { return _cache[name]; } else { final logger = Logger._internal(name); _cache[name] = logger; return logger; } } Logger._internal(this.name); void log(String msg) { if(!mute) { print(msg); } } } main() { var logger = Logger('UI'); logger.log('Button clicked'); } -
googlicius created this gist
May 5, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ // Main