def on_pub_build(self, *args, **kwargs): ga.Event( category='actions', action='on_pub_build', label='Running "pub build" command', value=1, ).send()
def on_dart_run(cls, *args, **kwargs): ga.Event( category='actions', action='on_dart_run', label='Running "Run" command', value=1, ).send()
def check_install(): install_record = os.path.join(sublime.packages_path(), 'User/sublime-dart-plugin-installed.txt') if os.path.exists(install_record): return touch(install_record) with open(install_record, 'wt') as f: f.write('autogenerated file. please do not delete.') ga.Event( category='actions', action='install', label='Plugin installed', value=1, ).send()