Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: packages/cli_util/example/main.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « packages/cli_util/analysis_options.yaml ('k') | packages/cli_util/lib/cli_logging.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:async';
6
7 import 'package:cli_util/cli_logging.dart';
8
9 main(List<String> args) async {
10 bool verbose = args.contains('-v');
11 Logger logger = verbose ? new Logger.verbose() : new Logger.standard();
12
13 logger.stdout('Hello world!');
14 logger.trace('message 1');
15 await new Future.delayed(new Duration(milliseconds: 200));
16 logger.trace('message 2');
17 logger.trace('message 3');
18
19 Progress progress = logger.progress('doing some work');
20 await new Future.delayed(new Duration(seconds: 2));
21 progress.finish(showTiming: true);
22
23 logger.stdout('All ${logger.ansi.emphasized('done')}.');
24 logger.flush();
25 }
OLDNEW
« no previous file with comments | « packages/cli_util/analysis_options.yaml ('k') | packages/cli_util/lib/cli_logging.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698