OLD | NEW |
| (Empty) |
1 import 'dart:io'; | |
2 import 'dart:async'; | |
3 | |
4 void printDailyNewsDigest() { | |
5 File file = new File("dailyNewsDigest.txt"); | |
6 Future future = file.readAsString(); | |
7 future.then((content) { | |
8 print(content); | |
9 }); | |
10 } | |
11 | |
12 void main() { | |
13 printDailyNewsDigest(); | |
14 printWinningLotteryNumbers(); | |
15 printWeatherForecast(); | |
16 printBaseballScore(); | |
17 } | |
18 | |
19 printWinningLotteryNumbers() { | |
20 print('Winning lotto numbers: [23, 63, 87, 26, 2]'); | |
21 } | |
22 | |
23 printWeatherForecast() { | |
24 print('Tomorrow\'s forecast: 70F, sunny.'); | |
25 } | |
26 | |
27 printBaseballScore() { | |
28 print('Baseball score: Red Sox 10, Yankees 0'); | |
29 } | |
OLD | NEW |