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
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>pi-monte-carlo</title> | |
| <script type="application/dart" src="main.dart"></script> | |
| </head> | 
  
    
      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
    
  
  
    
  | import 'dart:async'; | |
| import 'dart:math' show Random; | |
| main() async { | |
| print('Compute π using the Monte Carlo method.'); | |
| await for (var estimate in computePi().take(500)) { | |
| print('π ≅ $estimate'); | |
| } | |
| } | 
  
    
      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
    
  
  
    
  | // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'dart:async'; | |
| Future<void> printDailyNewsDigest() async { | |
| var newsDigest = await gatherNewsReports(); | |
| print(newsDigest); | |
| } | 
  
    
      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
    
  
  
    
  | // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'dart:async'; | |
| Future<void> printDailyNewsDigest() { | |
| final future = gatherNewsReports(); | |
| return future.then(print); | |
| // You don't *have* to return the future here. | 
  
    
      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
    
  
  
    
  | import 'dart:math'; | |
| abstract class Shape { | |
| factory Shape(String type) { | |
| if (type == 'circle') return Circle(2); | |
| if (type == 'square') return Square(2); | |
| // To trigger exception, don't implement a check for 'triangle'. | |
| throw 'Can\'t create $type.'; | |
| } | |
| num get area; | 
  
    
      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
    
  
  
    
  | import 'dart:async'; | |
| Future<void> f() async { | |
| print('1: before await'); | |
| await null; | |
| print('2: after await'); | |
| } | |
| // 3: before f() | |
| // 1: before await | 
  
    
      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
    
  
  
    
  | <h2>A Simple To-Do List</h2> | |
| <p>Things to do:</p> | |
| <ul id="todolist"> | |
| </ul> | 
  
    
      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
    
  
  
    
  | // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'dart:async'; | |
| Future<void> printDailyNewsDigest() { | |
| final future = gatherNewsReports(); | |
| return future.then(print); | |
| // You don't *have* to return the future here. | 
  
    
      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
    
  
  
    
  | // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'dart:async'; | |
| Future<void> printDailyNewsDigest() async { | |
| var newsDigest = await gatherNewsReports(); | |
| print(newsDigest); | |
| } | 
  
    
      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
    
  
  
    
  | # Supported lint rules and documentation: | |
| # http://dart-lang.github.io/linter/lints/ | |
| analyzer: | |
| exclude: [build/**] | |
| strong-mode: | |
| implicit-casts: false | |
| implicit-dynamic: false | |
| linter: |