From 56e673e9e6fc392d9add6cb0c891f43afe507212 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:07:27 +1000 Subject: [PATCH 01/26] Anagram --- anagram/.gitignore | 11 + anagram/analysis_options.yaml | 4 + anagram/pubspec.lock | 424 +++++++++++++++++++++++++++++++++- anagram/pubspec.yaml | 13 +- anagram/web/favicon.ico | Bin 0 -> 3559 bytes anagram/web/index.html | 39 ++-- 6 files changed, 463 insertions(+), 28 deletions(-) create mode 100644 anagram/.gitignore create mode 100644 anagram/analysis_options.yaml create mode 100644 anagram/web/favicon.ico diff --git a/anagram/.gitignore b/anagram/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/anagram/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/anagram/analysis_options.yaml b/anagram/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/anagram/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/anagram/pubspec.lock b/anagram/pubspec.lock index 968f26d..cbfd245 100644 --- a/anagram/pubspec.lock +++ b/anagram/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/anagram/pubspec.yaml b/anagram/pubspec.yaml index f0301f6..3720bc7 100644 --- a/anagram/pubspec.yaml +++ b/anagram/pubspec.yaml @@ -1,8 +1,13 @@ name: anagram description: A sample application -dependencies: - browser: ^0.10.0 + +environment: + sdk: '>=2.2.0 <3.0.0' + + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 homepage: https://www.dartlang.org/docs/tutorials/add-elements/ -gist: https://gist.github.com/Sfshaza/0532bfcb70bf5e4a900c -dartpad: https://dartpad.dartlang.org/0532bfcb70bf5e4a900c diff --git a/anagram/web/favicon.ico b/anagram/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 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 - + + Anagram - - + - + + - -

Anagram

+ +

Anagram

-

Pile:

-
-
- -

Word:

-
-
- -

Scrabble Value:

-

- - - +

Pile:

+
+
+ +

Word:

+
+
+ +

Scrabble Value:

+

+ + + From a3aa332db507de96be4f72719ad32035fed8c62e Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:09:03 +1000 Subject: [PATCH 02/26] cmdline --- cmdline/pubspec.lock | 2 +- cmdline/pubspec.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmdline/pubspec.lock b/cmdline/pubspec.lock index f99cfb0..31b7252 100644 --- a/cmdline/pubspec.lock +++ b/cmdline/pubspec.lock @@ -203,7 +203,7 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.7.0" pool: dependency: transitive description: diff --git a/cmdline/pubspec.yaml b/cmdline/pubspec.yaml index 15a3442..259dabb 100644 --- a/cmdline/pubspec.yaml +++ b/cmdline/pubspec.yaml @@ -2,7 +2,7 @@ name: cmdline description: A sample application environment: - sdk: '>=2.1.0 <3.0.0' + sdk: '>=2.2.0 <3.0.0' dependencies: args: any @@ -10,7 +10,7 @@ dependencies: test: any dev_dependencies: - pedantic: ^1.0.0 + pedantic: ^1.7.0 executables: dcat: From e71d231ad005b98a367d4fc68f7ef2bc7dbc0500 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:23:51 +1000 Subject: [PATCH 03/26] Async Await --- futures/async-await/.gitignore | 11 + futures/async-await/analysis_options.yaml | 4 + futures/async-await/pubspec.lock | 426 +++++++++++++++++++++- futures/async-await/pubspec.yaml | 10 +- futures/async-await/web/favicon.ico | Bin 0 -> 3559 bytes futures/async-await/web/index.html | 20 + futures/async-await/web/main.dart | 15 +- futures/async-await/web/styles.css | 13 + 8 files changed, 488 insertions(+), 11 deletions(-) create mode 100644 futures/async-await/.gitignore create mode 100644 futures/async-await/analysis_options.yaml create mode 100644 futures/async-await/web/favicon.ico create mode 100644 futures/async-await/web/index.html create mode 100644 futures/async-await/web/styles.css diff --git a/futures/async-await/.gitignore b/futures/async-await/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/futures/async-await/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/futures/async-await/analysis_options.yaml b/futures/async-await/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/futures/async-await/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/futures/async-await/pubspec.lock b/futures/async-await/pubspec.lock index c427295..cbfd245 100644 --- a/futures/async-await/pubspec.lock +++ b/futures/async-await/pubspec.lock @@ -1,5 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile -packages: {} +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: any + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/futures/async-await/pubspec.yaml b/futures/async-await/pubspec.yaml index 07517a6..d6463ee 100644 --- a/futures/async-await/pubspec.yaml +++ b/futures/async-await/pubspec.yaml @@ -1,7 +1,11 @@ name: async_await description: A sample application that reads a file on dartlang using async/await, and prints the contents. - homepage: https://www.dartlang.org/docs/tutorials/futures/ -gist: https://gist.github.com/Sfshaza/c0e8f5c38489ddeccb5a -dartpad: https://dartpad.dartlang.org/c0e8f5c38489ddeccb5a +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.7.0 diff --git a/futures/async-await/web/favicon.ico b/futures/async-await/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 zcmV|z)fLATAcZDKyK$JdGY~s=NSr`PnS}BvP$+3A z8CpoogqBhg+p;Cg51fS9@izOF7~1r6zw|?g zDQ!X_8B4l7_wKH=QY>4NwW55uUP;#D-rxP7bI-kdjtU{9Dpi9&%XV3<*GkWK^P@NG zgWRw6Vb?`n$T_Evx_k{$?y0Rh-E#bYD?-UGV3Tc>$SdfYhb2dG)#K`(KPKx z4IwA0_p^z5A4{(AI%=BqUe-mpgFoo&TY*3Gu!0a29lR)aGV2dpEZ4z|Kc)+FUc-bN zHIDPB&TC8HnJ0tyG0*^nmzmQ?TnN+!QqapY^N|7@`F5AqbYw-`02pC0LNbv4yz60?w^9K&j_>533B&I%i9tFNIn5p2kb+@G0y43>@$)ns6>BLG63+2Wpepx zJ&v#ILasL(C%pe{n)2h>g2u-1wVpgKUaNE4V$J76NI&82+j&+}!O~12Z$~FRKK$`9 zx^J3f|L@(w z@^0VL;CU-=w^+ZF9FR4?4ODJ#62DZXnxe`qk)!2S9)0Z%YeH3TkE!aMNY!YE_0LhF z2ESF$qU+kcNYfp>Oq;_Knx0_qs&4=0WPdHW`-Qyher0=jx5gB?QhDMW+Qc1=t$k|< zt=eZtRI`&@>AfXtZFZz?wIfZ37txkUL?4_$0OBvSIr99C2j2UN)Ni@j77k#SApKPq z|7OZGK1&}QM-|70VjJzpQ8hDwD&8DI6m)83lM`v+s(Btdr*I>`(aIvtK1ZDD;A51L zClILKDAJgMZ)-X|x8@2VC+X9BJv40&^lN&j5M^{HDvl4q-~qts09^Y4!n4Ma6_Lw34kz1b@>qe;tZn9VPT9z@k+{b=Lo2to6L3;F~QIz4!D1T|P-qRdf7Z303(CYKm}t10))3j2!;|tzyS7gc;G1rFhS73B&NU|LN;}mYr{eivPfUF zdm~5DreHsX?W>bdsM|qmnE=2HBnZ`V2&GU0HiPHE4BB~d@G=O*FMxyW35}^c+*y^d zu=LHL8rmGaLUn`myIgTKc-?scBq8(@2<4?z0#?C(P6j}(1UFeFC{V&pSs-Nh`dIqC zkq_zKagZ2z+AcRzw=V!dgs?$W0)eov1WLdv*y|LWVW)c@2!awQQ^c0$7^MT+`37Is z%4jsE07!ol4_@%H1b}B@02vS}j=YN~fUrVwC4dzE;VS8yeRqJ(To9x$c>TNqWIDzpRz&Sr zPzjP57~P9Na0}*O4%=_+^52#;fi&rNW3NA+l7688GL>)?AiTgTsszmeR~7(L6O~|@ zzz|qG+3C{n4%C4}E>qpUB(Ws{kV9bm(b{8HL<58sjR2ud0W;XQkP4(=2|ILf=2+pq z(O1(09&`AwG{n*Q)qw$JVxnF zMFb%C2^hk0fN(%m0*265LNmZ)!wN7*KLbbq8UaA{1auJa2wp!^`o#huDPc4NLNR?p zE@mJB=mh`=BfnEomf&3wBwPRh_zkhFA1nrdt00_4bi2$P+KLn!cjN=0CupO3Leg$3 zp*Vm{2>k+tq!Nk%A+NXX^~lmZ}E0)ru(A`q6O1aeT4#SAh5kY%uwe*{*64`?9{h|TK{lms9t zVMO!^gQrlLafwQR&uH5D+yIa;xWn}w$_&dP-ZmCH63kNx)pmez0+e9HK7lI?Lbe@Z zCIIH03!8~Gbn zf+p*Bct|+_8A_;n`y?vsWCSI&<*x)yyDR;;ESm|WDWSu=9V-Fv4K$Kt?D8OWhX~-< z8M4JKx(QsRgh2tq34qYWSpHUUkm|e@h>8u?io3kMt+jNkPo$fU+`TO^E$=_ zAV@2L(Nh=zdBX|I7zlv)vLWhvxn(AR^nQB+a(@#wUK`rQ52NkQchOw{V?Bles;Gnx zuO~1Di)SVo=CHckmenU{((WCK0PvY$@A#*1=j-)CbAeSgo{@WXVb|Yr24@501Of;Q zgQUdn@s6RV_;ctHhZSwHy^XM+5McC+FpA(acq zkST#cFbNRUG6bnF(C#1)tpLs{oldkvBx7pL^j%9 z^aQ|o(0&Tt4lvfjK-P*ds`G^*Gl%u3PGSg&Ms9I z*zZ)`R3{W-EGbbsnIz4z4?~&D2QBA=kRHntC1hrXOE4OI7(xn09lZ7ozLsW{b=7 zbnCtL2cfv(eDh3zWQflPAv+AgOlsk^pSVZR4(AZM7hvEebZwgR987~DJRT$~4t`JN z@IV4P-6z6hXeZ}5TxI0SRjTv?3$ouKS*60hr&tvtLe{uv^Z_W4m}z-GL@GnHGIPk* zw6ctFod^P(OD!y`KXwnJ@4>QqH;FL@i7G0^fC~dyCpy$y;qkr9N%VyCOuRPafGQLB zzxU5Nx5-m}$bfT6kttLODx@M`to1wZ2XmNi7JNd^g%aAUV6e$$mBbisA;#D$#u!)` zw}J0?$bOnExiyeYuJhSrI5vUQ{Xnh5v4#|I^i3@pb{W7_{P2k5GK==kbAYr zd@D&R#;~Cu!m^6Z1Sv9BK^_RF-@KuRkuuEQ=LX6u&}L20<6F-P1JfjkL^$kk*d@$ZG_p zlDS-4dId>x;8Ix))Ft8KEW?C11O-;*xfWL`Qzk1{Ldf+^h!aB1=lxg-30(gpl+6{; zlAp7sn($go>tSNJPRTIkIh2%t4%H;e)d~Xy$^IHbwmS{eULGp}7eC>K>x%RdXHl9i z=pa>P`f>La2+w!sQ%|I9!8C>-&H_}9-U;=8E{GN8praR|_~}w{8h=S2<}S6&1}__C z{K0ykqcUgtgVR>NYFus(0ow+ctv$LRyQjfxf3DtV-(8H>5U@W7MVi`%u=AlE% + + + + + + + + async_await + + + + + + + +
+ + + diff --git a/futures/async-await/web/main.dart b/futures/async-await/web/main.dart index 2fa7f23..c486273 100644 --- a/futures/async-await/web/main.dart +++ b/futures/async-await/web/main.dart @@ -5,12 +5,17 @@ import 'dart:html'; import 'dart:async'; +DivElement output = querySelector('#output'); +PreElement pre = PreElement(); + Future printDailyNewsDigest() async { String news = await gatherNewsReports(); - print(news); + pre.appendText(news); } void main() { + output.append(pre); + printDailyNewsDigest(); printWinningLotteryNumbers(); printWeatherForecast(); @@ -18,19 +23,19 @@ void main() { } void printWinningLotteryNumbers() { - print('Winning lotto numbers: [23, 63, 87, 26, 2]'); + pre.appendText('Winning lotto numbers: [23, 63, 87, 26, 2]\n'); } void printWeatherForecast() { - print('Tomorrow\'s forecast: 70F, sunny.'); + pre.appendText('Tomorrow\'s forecast: 70F, sunny.\n'); } void printBaseballScore() { - print('Baseball score: Red Sox 10, Yankees 0'); + pre.appendText('Baseball score: Red Sox 10, Yankees 0\n'); } // Imagine that this function is more complex and slow. :) Future gatherNewsReports() async { - String path = 'https://www.dartlang.org/f/dailyNewsDigest.txt'; + String path = 'https://dart.dev/f/dailyNewsDigest.txt'; return (await HttpRequest.getString(path)); } diff --git a/futures/async-await/web/styles.css b/futures/async-await/web/styles.css new file mode 100644 index 0000000..7fe7095 --- /dev/null +++ b/futures/async-await/web/styles.css @@ -0,0 +1,13 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto); + +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-family: 'Roboto', sans-serif; +} + +#output { + padding: 20px; +} From c1c55f86417073491f2e522b3c93936a3b21c8c0 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:29:53 +1000 Subject: [PATCH 04/26] Async Await with error catch --- futures/async-await-catch-error/.gitignore | 11 ++++++++++ .../analysis_options.yaml | 4 ++++ futures/async-await-catch-error/pubspec.yaml | 10 ++++++--- .../async-await-catch-error/web/favicon.ico | Bin 0 -> 3559 bytes .../async-await-catch-error/web/index.html | 20 ++++++++++++++++++ futures/async-await-catch-error/web/main.dart | 17 +++++++++------ .../async-await-catch-error/web/styles.css | 13 ++++++++++++ 7 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 futures/async-await-catch-error/.gitignore create mode 100644 futures/async-await-catch-error/analysis_options.yaml create mode 100644 futures/async-await-catch-error/web/favicon.ico create mode 100644 futures/async-await-catch-error/web/index.html create mode 100644 futures/async-await-catch-error/web/styles.css diff --git a/futures/async-await-catch-error/.gitignore b/futures/async-await-catch-error/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/futures/async-await-catch-error/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/futures/async-await-catch-error/analysis_options.yaml b/futures/async-await-catch-error/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/futures/async-await-catch-error/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/futures/async-await-catch-error/pubspec.yaml b/futures/async-await-catch-error/pubspec.yaml index c64ef69..5e0a9be 100644 --- a/futures/async-await-catch-error/pubspec.yaml +++ b/futures/async-await-catch-error/pubspec.yaml @@ -1,7 +1,11 @@ name: async_await_catch_error description: A sample application that reads a file on dartlang using async/await, and prints the contents; errors are caught. - homepage: https://www.dartlang.org/docs/tutorials/futures/ -gist: https://gist.github.com/Sfshaza/847e8d9a356f025ad5d6 -dartpad: https://dartpad.dartlang.org/847e8d9a356f025ad5d6 +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.7.0 diff --git a/futures/async-await-catch-error/web/favicon.ico b/futures/async-await-catch-error/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 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 + + + + + + + + async_await_catch_error + + + + + + + +
+ + + diff --git a/futures/async-await-catch-error/web/main.dart b/futures/async-await-catch-error/web/main.dart index 9f67f98..95c10bf 100644 --- a/futures/async-await-catch-error/web/main.dart +++ b/futures/async-await-catch-error/web/main.dart @@ -5,16 +5,21 @@ import 'dart:html'; import 'dart:async'; +DivElement output = querySelector('#output'); +PreElement pre = PreElement(); + Future printDailyNewsDigest() async { try { String news = await gatherNewsReports(); - print(news); + pre.appendText(news); } catch (e) { - // ... handle error ... + pre.appendText('Something went wrong: $e'); } } void main() { + output.append(pre); + printDailyNewsDigest(); printWinningLotteryNumbers(); printWeatherForecast(); @@ -22,20 +27,20 @@ void main() { } void printWinningLotteryNumbers() { - print('Winning lotto numbers: [23, 63, 87, 26, 2]'); + pre.appendText('Winning lotto numbers: [23, 63, 87, 26, 2]\n'); } void printWeatherForecast() { - print('Tomorrow\'s forecast: 70F, sunny.'); + pre.appendText('Tomorrow\'s forecast: 70F, sunny.\n'); } void printBaseballScore() { - print('Baseball score: Red Sox 10, Yankees 0'); + pre.appendText('Baseball score: Red Sox 10, Yankees 0\n'); } // Imagine that this function is more complex and slow. :) Future gatherNewsReports() async { - String path = 'https://www.dartlang.org/f/dailyNewsDigest.txt'; + String path = 'https://dart.dev/f/dailyNewsDigest.txt'; String content = await HttpRequest.getString(path); return content; } diff --git a/futures/async-await-catch-error/web/styles.css b/futures/async-await-catch-error/web/styles.css new file mode 100644 index 0000000..7fe7095 --- /dev/null +++ b/futures/async-await-catch-error/web/styles.css @@ -0,0 +1,13 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto); + +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-family: 'Roboto', sans-serif; +} + +#output { + padding: 20px; +} From 89708bb59e80682a5523e5edd0ceea1645dcff5f Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:35:11 +1000 Subject: [PATCH 05/26] futures api --- futures/futures-api/.gitignore | 11 + futures/futures-api/analysis_options.yaml | 4 + futures/futures-api/pubspec.lock | 426 +++++++++++++++++++++- futures/futures-api/pubspec.yaml | 10 +- futures/futures-api/web/favicon.ico | Bin 0 -> 3559 bytes futures/futures-api/web/index.html | 20 + futures/futures-api/web/main.dart | 15 +- futures/futures-api/web/styles.css | 13 + 8 files changed, 488 insertions(+), 11 deletions(-) create mode 100644 futures/futures-api/.gitignore create mode 100644 futures/futures-api/analysis_options.yaml create mode 100644 futures/futures-api/web/favicon.ico create mode 100644 futures/futures-api/web/index.html create mode 100644 futures/futures-api/web/styles.css diff --git a/futures/futures-api/.gitignore b/futures/futures-api/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/futures/futures-api/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/futures/futures-api/analysis_options.yaml b/futures/futures-api/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/futures/futures-api/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/futures/futures-api/pubspec.lock b/futures/futures-api/pubspec.lock index c427295..cbfd245 100644 --- a/futures/futures-api/pubspec.lock +++ b/futures/futures-api/pubspec.lock @@ -1,5 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile -packages: {} +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: any + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/futures/futures-api/pubspec.yaml b/futures/futures-api/pubspec.yaml index 09a5d56..fd9b24a 100644 --- a/futures/futures-api/pubspec.yaml +++ b/futures/futures-api/pubspec.yaml @@ -1,7 +1,11 @@ name: futures_api description: A sample application that reads a file on dartlang using the Futures API, and prints the contents. - homepage: https://www.dartlang.org/docs/tutorials/futures/ -gist: https://gist.github.com/Sfshaza/ba1b258f810e34231a62 -dartpad: https://dartpad.dartlang.org/ba1b258f810e34231a62 +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.7.0 diff --git a/futures/futures-api/web/favicon.ico b/futures/futures-api/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 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 + + + + + + + + futures_api + + + + + + + +
+ + + diff --git a/futures/futures-api/web/main.dart b/futures/futures-api/web/main.dart index a29f8f8..d738f6f 100644 --- a/futures/futures-api/web/main.dart +++ b/futures/futures-api/web/main.dart @@ -5,12 +5,17 @@ import 'dart:html'; import 'dart:async'; +DivElement output = querySelector('#output'); +PreElement pre = PreElement(); + void printDailyNewsDigest() { Future future = gatherNewsReports(); - future.then((content) => print(content)); + future.then((content) => pre.appendText(content)); } void main() { + output.append(pre); + printDailyNewsDigest(); printWinningLotteryNumbers(); printWeatherForecast(); @@ -18,19 +23,19 @@ void main() { } void printWinningLotteryNumbers() { - print('Winning lotto numbers: [23, 63, 87, 26, 2]'); + pre.appendText('Winning lotto numbers: [23, 63, 87, 26, 2]\n'); } void printWeatherForecast() { - print('Tomorrow\'s forecast: 70F, sunny.'); + pre.appendText('Tomorrow\'s forecast: 70F, sunny.\n'); } void printBaseballScore() { - print('Baseball score: Red Sox 10, Yankees 0'); + pre.appendText('Baseball score: Red Sox 10, Yankees 0\n'); } // Imagine that this function is more complex and slow. :) Future gatherNewsReports() { - String path = 'https://www.dartlang.org/f/dailyNewsDigest.txt'; + String path = 'https://dart.dev/f/dailyNewsDigest.txt'; return HttpRequest.getString(path); } diff --git a/futures/futures-api/web/styles.css b/futures/futures-api/web/styles.css new file mode 100644 index 0000000..7fe7095 --- /dev/null +++ b/futures/futures-api/web/styles.css @@ -0,0 +1,13 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto); + +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-family: 'Roboto', sans-serif; +} + +#output { + padding: 20px; +} From 1144fae6a68fafb9f6b1d36104c9f061f6455fda Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:41:50 +1000 Subject: [PATCH 06/26] futures-api-catch-error --- futures/futures-api-catch-error/.gitignore | 11 + .../analysis_options.yaml | 4 + futures/futures-api-catch-error/pubspec.lock | 426 +++++++++++++++++- futures/futures-api-catch-error/pubspec.yaml | 10 +- .../futures-api-catch-error/web/favicon.ico | Bin 0 -> 3559 bytes .../futures-api-catch-error/web/index.html | 20 + futures/futures-api-catch-error/web/main.dart | 17 +- .../futures-api-catch-error/web/styles.css | 13 + 8 files changed, 489 insertions(+), 12 deletions(-) create mode 100644 futures/futures-api-catch-error/.gitignore create mode 100644 futures/futures-api-catch-error/analysis_options.yaml create mode 100644 futures/futures-api-catch-error/web/favicon.ico create mode 100644 futures/futures-api-catch-error/web/index.html create mode 100644 futures/futures-api-catch-error/web/styles.css diff --git a/futures/futures-api-catch-error/.gitignore b/futures/futures-api-catch-error/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/futures/futures-api-catch-error/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/futures/futures-api-catch-error/analysis_options.yaml b/futures/futures-api-catch-error/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/futures/futures-api-catch-error/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/futures/futures-api-catch-error/pubspec.lock b/futures/futures-api-catch-error/pubspec.lock index c427295..cbfd245 100644 --- a/futures/futures-api-catch-error/pubspec.lock +++ b/futures/futures-api-catch-error/pubspec.lock @@ -1,5 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile -packages: {} +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: any + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/futures/futures-api-catch-error/pubspec.yaml b/futures/futures-api-catch-error/pubspec.yaml index 235d27a..0bb2f94 100644 --- a/futures/futures-api-catch-error/pubspec.yaml +++ b/futures/futures-api-catch-error/pubspec.yaml @@ -1,7 +1,11 @@ name: futures_api_catch_error description: A sample application that reads a file on dartlang using the Futures API, and prints the contents; errors are caught. - homepage: https://www.dartlang.org/docs/tutorials/futures/ -gist: https://gist.github.com/Sfshaza/a9d90ac89aded272d1ca -dartpad: https://dartpad.dartlang.org/a9d90ac89aded272d1ca +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/futures/futures-api-catch-error/web/favicon.ico b/futures/futures-api-catch-error/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 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 + + + + + + + + futures_api_catch_error + + + + + + + +
+ + + diff --git a/futures/futures-api-catch-error/web/main.dart b/futures/futures-api-catch-error/web/main.dart index 75dbc66..961ad05 100644 --- a/futures/futures-api-catch-error/web/main.dart +++ b/futures/futures-api-catch-error/web/main.dart @@ -5,12 +5,17 @@ import 'dart:html'; import 'dart:async'; +DivElement output = querySelector('#output'); +PreElement pre = PreElement(); + void printDailyNewsDigest() { Future future = gatherNewsReports(); - future.then((content) => print(content)).catchError((e) => handleError(e)); + future.then((content) => pre.appendText(content)).catchError((e) => handleError(e)); } void main() { + output.append(pre); + printDailyNewsDigest(); printWinningLotteryNumbers(); printWeatherForecast(); @@ -18,23 +23,23 @@ void main() { } void handleError(e) { - print('handleError'); + pre.appendText('handleError: $e'); } void printWinningLotteryNumbers() { - print('Winning lotto numbers: [23, 63, 87, 26, 2]'); + pre.appendText('Winning lotto numbers: [23, 63, 87, 26, 2]\n'); } void printWeatherForecast() { - print('Tomorrow\'s forecast: 70F, sunny.'); + pre.appendText('Tomorrow\'s forecast: 70F, sunny.\n'); } void printBaseballScore() { - print('Baseball score: Red Sox 10, Yankees 0'); + pre.appendText('Baseball score: Red Sox 10, Yankees 30\n'); } // Imagine that this function is more complex and slow. :) Future gatherNewsReports() { - String path = 'https://www.dartlang.org/f/dailyNewsDigest.txt'; + String path = 'https://dart.dev/f/dailyNewsDigest.txt'; return HttpRequest.getString(path); } diff --git a/futures/futures-api-catch-error/web/styles.css b/futures/futures-api-catch-error/web/styles.css new file mode 100644 index 0000000..7fe7095 --- /dev/null +++ b/futures/futures-api-catch-error/web/styles.css @@ -0,0 +1,13 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto); + +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-family: 'Roboto', sans-serif; +} + +#output { + padding: 20px; +} From bc8b65cde3615e580abf68a50b88d8fdabca024d Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:52:24 +1000 Subject: [PATCH 07/26] sequential-processing --- futures/sequential-processing/.gitignore | 11 + .../analysis_options.yaml | 4 + futures/sequential-processing/pubspec.lock | 426 +++++++++++++++++- futures/sequential-processing/pubspec.yaml | 12 +- futures/sequential-processing/web/favicon.ico | Bin 0 -> 3559 bytes futures/sequential-processing/web/index.html | 20 + futures/sequential-processing/web/main.dart | 9 +- futures/sequential-processing/web/styles.css | 13 + 8 files changed, 484 insertions(+), 11 deletions(-) create mode 100644 futures/sequential-processing/.gitignore create mode 100644 futures/sequential-processing/analysis_options.yaml create mode 100644 futures/sequential-processing/web/favicon.ico create mode 100644 futures/sequential-processing/web/index.html create mode 100644 futures/sequential-processing/web/styles.css diff --git a/futures/sequential-processing/.gitignore b/futures/sequential-processing/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/futures/sequential-processing/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/futures/sequential-processing/analysis_options.yaml b/futures/sequential-processing/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/futures/sequential-processing/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/futures/sequential-processing/pubspec.lock b/futures/sequential-processing/pubspec.lock index c427295..cbfd245 100644 --- a/futures/sequential-processing/pubspec.lock +++ b/futures/sequential-processing/pubspec.lock @@ -1,5 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile -packages: {} +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: any + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/futures/sequential-processing/pubspec.yaml b/futures/sequential-processing/pubspec.yaml index 2cb1c9d..9181f7d 100644 --- a/futures/sequential-processing/pubspec.yaml +++ b/futures/sequential-processing/pubspec.yaml @@ -1,7 +1,11 @@ -name: sequential_procesing +name: sequential_processing description: A sample application that performs time consuming operations sequentially. - homepage: https://www.dartlang.org/docs/tutorials/futures/ -gist: https://gist.github.com/Sfshaza/6df1121fd6ea7b9e5201 -dartpad: https://dartpad.dartlang.org/6df1121fd6ea7b9e5201 +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.7.0 diff --git a/futures/sequential-processing/web/favicon.ico b/futures/sequential-processing/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 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 + + + + + + + + sequential_processing + + + + + + + +
+ + + diff --git a/futures/sequential-processing/web/main.dart b/futures/sequential-processing/web/main.dart index 58eab11..481f590 100644 --- a/futures/sequential-processing/web/main.dart +++ b/futures/sequential-processing/web/main.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:html'; void main() { expensiveA() @@ -11,10 +12,10 @@ void main() { .then((cValue) => doSomethingWith(cValue)); } -Future expensiveA() => new Future.value('from expensiveA'); -Future expensiveB() => new Future.value('from expensiveB'); -Future expensiveC() => new Future.value('from expensiveC'); +Future expensiveA() => Future.value('from expensiveA'); +Future expensiveB() => Future.value('from expensiveB'); +Future expensiveC() => Future.value('from expensiveC'); void doSomethingWith(value) { - print(value); + querySelector('#output').appendText(value); } diff --git a/futures/sequential-processing/web/styles.css b/futures/sequential-processing/web/styles.css new file mode 100644 index 0000000..7fe7095 --- /dev/null +++ b/futures/sequential-processing/web/styles.css @@ -0,0 +1,13 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto); + +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-family: 'Roboto', sans-serif; +} + +#output { + padding: 20px; +} From 15292bdbdd4a389390cfb286b156e735cf8a7eec Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 10:58:41 +1000 Subject: [PATCH 08/26] waiting-on-futures --- futures/waiting-on-futures/.gitignore | 11 + .../waiting-on-futures/analysis_options.yaml | 4 + futures/waiting-on-futures/pubspec.lock | 426 +++++++++++++++++- futures/waiting-on-futures/pubspec.yaml | 10 +- futures/waiting-on-futures/web/favicon.ico | Bin 0 -> 3559 bytes futures/waiting-on-futures/web/index.html | 20 + futures/waiting-on-futures/web/main.dart | 20 +- futures/waiting-on-futures/web/styles.css | 13 + httpserver/.dart_tool/pub/bin/sdk-version | 1 + 9 files changed, 488 insertions(+), 17 deletions(-) create mode 100644 futures/waiting-on-futures/.gitignore create mode 100644 futures/waiting-on-futures/analysis_options.yaml create mode 100644 futures/waiting-on-futures/web/favicon.ico create mode 100644 futures/waiting-on-futures/web/index.html create mode 100644 futures/waiting-on-futures/web/styles.css create mode 100644 httpserver/.dart_tool/pub/bin/sdk-version diff --git a/futures/waiting-on-futures/.gitignore b/futures/waiting-on-futures/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/futures/waiting-on-futures/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/futures/waiting-on-futures/analysis_options.yaml b/futures/waiting-on-futures/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/futures/waiting-on-futures/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/futures/waiting-on-futures/pubspec.lock b/futures/waiting-on-futures/pubspec.lock index c427295..cbfd245 100644 --- a/futures/waiting-on-futures/pubspec.lock +++ b/futures/waiting-on-futures/pubspec.lock @@ -1,5 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile -packages: {} +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: any + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/futures/waiting-on-futures/pubspec.yaml b/futures/waiting-on-futures/pubspec.yaml index 76a28b7..12a4abd 100644 --- a/futures/waiting-on-futures/pubspec.yaml +++ b/futures/waiting-on-futures/pubspec.yaml @@ -1,7 +1,11 @@ name: waiting_on_futures description: A sample application that triggers three functions and waits until all are finished. - homepage: https://www.dartlang.org/docs/tutorials/futures/ -gist: https://gist.github.com/Sfshaza/7babd77d2b5460bc9251 -dartpad: https://dartpad.dartlang.org/7babd77d2b5460bc9251 +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.7.0 diff --git a/futures/waiting-on-futures/web/favicon.ico b/futures/waiting-on-futures/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7ba349b3e628d2423d4a2ed217422a4722f73739 GIT binary patch literal 3559 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 + + + + + + + + waiting_on_futures + + + + + + + +
+ + + diff --git a/futures/waiting-on-futures/web/main.dart b/futures/waiting-on-futures/web/main.dart index 62d632d..c992dfe 100644 --- a/futures/waiting-on-futures/web/main.dart +++ b/futures/waiting-on-futures/web/main.dart @@ -3,26 +3,24 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:html'; + +DivElement output = querySelector('#output'); void main() { - Future - .wait([expensiveA(), expensiveB(), expensiveC()]) + Future.wait([expensiveA(), expensiveB(), expensiveC()]) .then((List responses) => chooseBestResponse(responses)) .catchError((e) => handleError(e)); } -Future expensiveA() => new Future.value('from expensiveA'); -Future expensiveB() => new Future.value('from expensiveB'); -Future expensiveC() => new Future.value('from expensiveC'); - -void doSomethingWith(value) { - print(value); -} +Future expensiveA() => Future.value('from expensiveA'); +Future expensiveB() => Future.value('from expensiveB'); +Future expensiveC() => Future.value('from expensiveC'); void chooseBestResponse(List responses) { - print(responses[1]); + output.appendText(responses[1]); } void handleError(e) { - print('error handled'); + output.appendText('handle error: $e'); } diff --git a/futures/waiting-on-futures/web/styles.css b/futures/waiting-on-futures/web/styles.css new file mode 100644 index 0000000..7fe7095 --- /dev/null +++ b/futures/waiting-on-futures/web/styles.css @@ -0,0 +1,13 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto); + +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-family: 'Roboto', sans-serif; +} + +#output { + padding: 20px; +} diff --git a/httpserver/.dart_tool/pub/bin/sdk-version b/httpserver/.dart_tool/pub/bin/sdk-version new file mode 100644 index 0000000..f90b1af --- /dev/null +++ b/httpserver/.dart_tool/pub/bin/sdk-version @@ -0,0 +1 @@ +2.3.2 From 3d0b984ad582d2a9425aa34af5396293c1df3979 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 11:03:11 +1000 Subject: [PATCH 09/26] hrlloworld --- helloworld/.gitignore | 11 +++++++++++ helloworld/analysis_options.yaml | 4 ++++ helloworld/pubspec.lock | 13 ++++++++++--- helloworld/pubspec.yaml | 7 ++++++- 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 helloworld/.gitignore create mode 100644 helloworld/analysis_options.yaml diff --git a/helloworld/.gitignore b/helloworld/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/helloworld/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/helloworld/analysis_options.yaml b/helloworld/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/helloworld/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/helloworld/pubspec.lock b/helloworld/pubspec.lock index c427295..f6dadac 100644 --- a/helloworld/pubspec.lock +++ b/helloworld/pubspec.lock @@ -1,5 +1,12 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile -packages: {} +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" sdks: - dart: any + dart: ">=2.2.0 <3.0.0" diff --git a/helloworld/pubspec.yaml b/helloworld/pubspec.yaml index 7bd496b..e68b305 100644 --- a/helloworld/pubspec.yaml +++ b/helloworld/pubspec.yaml @@ -1,4 +1,9 @@ name: helloworld description: A sample application - homepage: https://www.dartlang.org/docs/tutorials/cmdline/ + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + pedantic: ^1.7.0 From 19211f1ba66d960109e8fa0e818b486673fbc8fe Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 11:16:19 +1000 Subject: [PATCH 10/26] anagram, pt 2 --- anagram/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anagram/pubspec.yaml b/anagram/pubspec.yaml index 3720bc7..3f768fa 100644 --- a/anagram/pubspec.yaml +++ b/anagram/pubspec.yaml @@ -8,6 +8,6 @@ environment: dev_dependencies: build_runner: ^1.1.2 build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + pedantic: ^1.7.0 homepage: https://www.dartlang.org/docs/tutorials/add-elements/ From 3d4f3d359ee17133791d4f84c2f697866587af80 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 13:36:56 +1000 Subject: [PATCH 11/26] httpserver --- httpserver/.gitignore | 13 + httpserver/analysis_options.yaml | 4 + httpserver/bin/basic_file_server.dart | 12 +- httpserver/bin/basic_writer_server.dart | 9 +- httpserver/bin/hello_world_server.dart | 7 +- httpserver/bin/hello_world_server_secure.dart | 11 +- httpserver/bin/mini_file_server.dart | 10 +- httpserver/bin/note_server.dart | 21 +- httpserver/bin/number_thinker.dart | 1 + httpserver/bin/static_file_server.dart | 2 +- httpserver/pubspec.lock | 240 ++++++++++++++---- httpserver/pubspec.yaml | 10 +- httpserver/test/httpserver_test.dart | 5 +- httpserver/web/note_client.dart | 5 +- httpserver/web/note_taker.html | 3 +- 15 files changed, 266 insertions(+), 87 deletions(-) create mode 100644 httpserver/analysis_options.yaml diff --git a/httpserver/.gitignore b/httpserver/.gitignore index 42d9955..6908e39 100644 --- a/httpserver/.gitignore +++ b/httpserver/.gitignore @@ -1 +1,14 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ + +# Content written out by bin/basic_writer_server.dart file.txt diff --git a/httpserver/analysis_options.yaml b/httpserver/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/httpserver/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/httpserver/bin/basic_file_server.dart b/httpserver/bin/basic_file_server.dart index c78d606..bd4561a 100644 --- a/httpserver/bin/basic_file_server.dart +++ b/httpserver/bin/basic_file_server.dart @@ -11,15 +11,17 @@ import 'dart:async'; import 'dart:io'; import 'package:http_server/http_server.dart'; +import 'package:path/path.dart'; -File targetFile = File('index.html'); +var targetFile = + File(join(dirname(Platform.script.toFilePath()), 'index.html')); Future main() async { - VirtualDirectory staticFiles = VirtualDirectory('.'); + var staticFiles = VirtualDirectory('.'); - var serverRequests = - await HttpServer.bind(InternetAddress.loopbackIPv4, 4046); - await for (var request in serverRequests) { + var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 4046); + print('Listening on http://${server.address.address}:${server.port}/'); + await for (var request in server) { staticFiles.serveFile(targetFile, request); } } diff --git a/httpserver/bin/basic_writer_server.dart b/httpserver/bin/basic_writer_server.dart index c468f21..39cd151 100644 --- a/httpserver/bin/basic_writer_server.dart +++ b/httpserver/bin/basic_writer_server.dart @@ -14,6 +14,7 @@ String _host = InternetAddress.loopbackIPv4.host; Future main() async { var server = await HttpServer.bind(_host, 4049); + print('Listening on http://${server.address.address}:${server.port}/'); await for (var req in server) { ContentType contentType = req.headers.contentType; HttpResponse response = req.response; @@ -21,12 +22,10 @@ Future main() async { if (req.method == 'POST' && contentType?.mimeType == 'application/json' /*1*/) { try { - String content = - await req.transform(utf8.decoder).join(); /*2*/ + String content = await req.transform(utf8.decoder).join(); /*2*/ var data = jsonDecode(content) as Map; /*3*/ var fileName = req.uri.pathSegments.last; /*4*/ - await File(fileName) - .writeAsString(content, mode: FileMode.write); + await File(fileName).writeAsString(content, mode: FileMode.write); req.response ..statusCode = HttpStatus.ok ..write('Wrote data for ${data['name']}.'); @@ -40,6 +39,6 @@ Future main() async { ..statusCode = HttpStatus.methodNotAllowed ..write("Unsupported request: ${req.method}."); } - response.close(); + await response.close(); } } diff --git a/httpserver/bin/hello_world_server.dart b/httpserver/bin/hello_world_server.dart index 118a25b..e0de8ff 100644 --- a/httpserver/bin/hello_world_server.dart +++ b/httpserver/bin/hello_world_server.dart @@ -12,11 +12,10 @@ Future main() async { InternetAddress.loopbackIPv4, 4040, ); - print('Listening on localhost:${server.port}'); + print('Listening on http://${server.address.address}:${server.port}/'); await for (HttpRequest request in server) { - request.response - ..write('Hello, world!') - ..close(); + request.response.write('Hello, world!'); + await request.response.close(); } } diff --git a/httpserver/bin/hello_world_server_secure.dart b/httpserver/bin/hello_world_server_secure.dart index 9f89084..2fea45c 100644 --- a/httpserver/bin/hello_world_server_secure.dart +++ b/httpserver/bin/hello_world_server_secure.dart @@ -12,24 +12,25 @@ import 'dart:async'; import 'dart:io'; +import 'package:path/path.dart' show dirname; String certificateChain = 'server_chain.pem'; String serverKey = 'server_key.pem'; Future main() async { + Directory.current = dirname(Platform.script.toFilePath()); var serverContext = SecurityContext(); /*1*/ serverContext.useCertificateChain(certificateChain); /*2*/ serverContext.usePrivateKey(serverKey, password: 'dartdart'); /*3*/ var server = await HttpServer.bindSecure( - 'localhost', + InternetAddress.loopbackIPv4, 4047, serverContext, /*4*/ ); - print('Listening on localhost:${server.port}'); + print('Listening on https://${server.address.address}:${server.port}/'); await for (HttpRequest request in server) { - request.response - ..write('Hello, world!') - ..close(); + request.response.write('Hello, world!'); + await request.response.close(); } } diff --git a/httpserver/bin/mini_file_server.dart b/httpserver/bin/mini_file_server.dart index fd3c722..f30362b 100644 --- a/httpserver/bin/mini_file_server.dart +++ b/httpserver/bin/mini_file_server.dart @@ -9,8 +9,10 @@ import 'dart:async'; import 'dart:io'; +import 'package:path/path.dart'; -File targetFile = File('index.html'); +var targetFile = + File(join(dirname(Platform.script.toFilePath()), 'index.html')); Future main() async { var server; @@ -21,6 +23,7 @@ Future main() async { print("Couldn't bind to port 4044: $e"); exit(-1); } + print('Listening on http://${server.address.address}:${server.port}/'); await for (HttpRequest req in server) { if (await targetFile.exists()) { @@ -34,9 +37,8 @@ Future main() async { } } else { print("Can't open ${targetFile.path}."); - req.response - ..statusCode = HttpStatus.notFound - ..close(); + req.response.statusCode = HttpStatus.notFound; + await req.response.close(); } } } diff --git a/httpserver/bin/note_server.dart b/httpserver/bin/note_server.dart index e93f26e..4f2027a 100644 --- a/httpserver/bin/note_server.dart +++ b/httpserver/bin/note_server.dart @@ -8,10 +8,13 @@ import 'dart:async'; import 'dart:io'; import 'dart:convert' show utf8, json; +import 'package:path/path.dart' show dirname; int count = 0; Future main() async { + Directory.current = dirname(Platform.script.toFilePath()); + // One note per line. try { List lines = File('notes.txt').readAsLinesSync(); @@ -21,9 +24,8 @@ Future main() async { return; } - var server = - await HttpServer.bind(InternetAddress.loopbackIPv4, 4042); - print('Listening for requests on 4042.'); + var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 4042); + print('Listening on http://${server.address.address}:${server.port}/'); await listenForRequests(server); } @@ -31,7 +33,7 @@ Future listenForRequests(HttpServer requests) async { await for (HttpRequest request in requests) { switch (request.method) { case 'POST': - handlePost(request); + await handlePost(request); break; case 'OPTION': handleOptions(request); @@ -50,9 +52,8 @@ Future handlePost(HttpRequest request) async { addCorsHeaders(request.response); try { - decoded = await request - .transform(utf8.decoder.fuse(json.decoder)) - .first as Map; + decoded = + await request.transform(utf8.decoder.fuse(json.decoder)).first as Map; } catch (e) { print('Request listen error: $e'); return; @@ -67,8 +68,7 @@ Future handlePost(HttpRequest request) async { void saveNote(HttpRequest request, String myNote) { try { - File('notes.txt') - .writeAsStringSync(myNote, mode: FileMode.append); + File('notes.txt').writeAsStringSync(myNote, mode: FileMode.append); } catch (e) { print('Couldn\'t open notes.txt: $e'); request.response @@ -116,8 +116,7 @@ void handleOptions(HttpRequest request) { void addCorsHeaders(HttpResponse response) { response.headers.add('Access-Control-Allow-Origin', '*'); - response.headers - .add('Access-Control-Allow-Methods', 'POST, OPTIONS'); + response.headers.add('Access-Control-Allow-Methods', 'POST, OPTIONS'); response.headers.add('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); } diff --git a/httpserver/bin/number_thinker.dart b/httpserver/bin/number_thinker.dart index 6d1bcb0..194dffb 100644 --- a/httpserver/bin/number_thinker.dart +++ b/httpserver/bin/number_thinker.dart @@ -21,6 +21,7 @@ Future main() async { InternetAddress.loopbackIPv4, 4041, ); + print('Listening on http://${server.address.address}:${server.port}/'); await for (var request in server) { handleRequest(request); } diff --git a/httpserver/bin/static_file_server.dart b/httpserver/bin/static_file_server.dart index dfc5d39..bcffaab 100644 --- a/httpserver/bin/static_file_server.dart +++ b/httpserver/bin/static_file_server.dart @@ -21,6 +21,6 @@ Future main() async { }; var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 4048); - print('Listening on port 4048'); + print('Listening on http://${server.address.address}:${server.port}/'); await server.forEach(staticFiles.serveRequest); /*4*/ } diff --git a/httpserver/pubspec.lock b/httpserver/pubspec.lock index e32f45d..ca689da 100644 --- a/httpserver/pubspec.lock +++ b/httpserver/pubspec.lock @@ -7,21 +7,35 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.32.5" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" boolean_selector: dependency: transitive description: @@ -29,6 +43,76 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.4" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" charcode: dependency: transitive description: @@ -36,6 +120,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" collection: dependency: transitive description: @@ -49,7 +140,7 @@ packages: name: convert url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.1" crypto: dependency: transitive description: @@ -57,20 +148,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.6" - csslib: + dart_style: dependency: transitive description: - name: csslib + name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "0.14.5" + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" front_end: dependency: transitive description: name: front_end url: "https://pub.dartlang.org" source: hosted - version: "0.1.4+1" + version: "0.1.14" glob: dependency: transitive description: @@ -78,27 +176,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.7" - html: + graphs: dependency: transitive description: - name: html + name: graphs url: "https://pub.dartlang.org" source: hosted - version: "0.13.3+3" + version: "0.2.0" http: dependency: transitive description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.11.3+17" + version: "0.12.0+2" http_multi_server: dependency: transitive description: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.0" http_parser: dependency: transitive description: @@ -112,7 +210,7 @@ packages: name: http_server url: "https://pub.dartlang.org" source: hosted - version: "0.9.8" + version: "0.9.8+1" io: dependency: transitive description: @@ -127,20 +225,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" json_rpc_2: dependency: transitive description: name: json_rpc_2 url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.1.0" kernel: dependency: transitive description: name: kernel url: "https://pub.dartlang.org" source: hosted - version: "0.3.4+1" + version: "0.3.14" logging: dependency: transitive description: @@ -154,21 +259,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.3+1" + version: "0.12.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.7" mime: dependency: transitive description: name: mime url: "https://pub.dartlang.org" source: hosted - version: "0.9.6+2" + version: "0.9.6+3" multi_server_socket: dependency: transitive description: @@ -196,28 +301,35 @@ packages: name: package_resolver url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.10" path: - dependency: transitive + dependency: "direct main" description: name: path url: "https://pub.dartlang.org" source: hosted version: "1.6.2" - plugin: - dependency: transitive + pedantic: + dependency: "direct dev" description: - name: plugin + name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+3" + version: "1.7.0" pool: dependency: transitive description: name: pool url: "https://pub.dartlang.org" source: hosted - version: "1.3.6" + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" pub_semver: dependency: transitive description: @@ -225,13 +337,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "0.7.3+3" + version: "0.7.5" shelf_packages_handler: dependency: transitive description: @@ -252,7 +385,7 @@ packages: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "0.2.2+4" + version: "0.2.3" source_map_stack_trace: dependency: transitive description: @@ -266,14 +399,14 @@ packages: name: source_maps url: "https://pub.dartlang.org" source: hosted - version: "0.10.7" + version: "0.10.8" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.4.1" + version: "1.5.5" stack_trace: dependency: transitive description: @@ -287,7 +420,14 @@ packages: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "1.6.8" + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" string_scanner: dependency: transitive description: @@ -301,35 +441,49 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.0" test: dependency: "direct dev" description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" - typed_data: + version: "1.6.3" + test_api: dependency: transitive description: - name: typed_data + name: test_api url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" - utf: + version: "0.2.5" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.5" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: dependency: transitive description: - name: utf + name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "0.9.0+5" + version: "1.1.6" vm_service_client: dependency: transitive description: name: vm_service_client url: "https://pub.dartlang.org" source: hosted - version: "0.2.6" + version: "0.2.6+2" watcher: dependency: transitive description: @@ -343,13 +497,13 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "1.0.9" + version: "1.0.13" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.1.15" + version: "2.1.16" sdks: - dart: ">=2.0.0 <3.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/httpserver/pubspec.yaml b/httpserver/pubspec.yaml index e1de5f9..5aa7fea 100644 --- a/httpserver/pubspec.yaml +++ b/httpserver/pubspec.yaml @@ -3,10 +3,14 @@ description: Sample HTTP clients and servers homepage: https://www.dartlang.org/docs/tutorials/httpserver/ environment: - sdk: '>=2.0.0 <3.0.0' + sdk: '>=2.2.0 <3.0.0' dependencies: - http_server: ^0.9.6 + http_server: ^0.9.8+1 + path: ^1.6.2 dev_dependencies: - test: ^1.0.0 + test: ^1.6.3 + pedantic: ^1.7.0 + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 diff --git a/httpserver/test/httpserver_test.dart b/httpserver/test/httpserver_test.dart index fc3a49c..54dfe14 100644 --- a/httpserver/test/httpserver_test.dart +++ b/httpserver/test/httpserver_test.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; import 'package:test/test.dart'; +import 'package:path/path.dart'; import '../bin/basic_file_server.dart' as basic_file_server; import '../bin/basic_writer_client.dart' as basic_writer_client; import '../bin/basic_writer_server.dart' as basic_writer_server; @@ -24,7 +25,7 @@ void main() { hello_world_server.main(), _test(), ]), - prints(startsWith('Listening on localhost:$port'))); + prints(startsWith('Listening on http://127.0.0.1:$port'))); }); group('number_thinker and number_guesser:', () { @@ -146,7 +147,7 @@ void main() { _server(), _test(), ]), - prints('Serving ${file.path}.\n')); + prints('Listening on http://127.0.0.1:4044/\nServing ${file.path}.\n')); }); test('basic_file_server', () async { diff --git a/httpserver/web/note_client.dart b/httpserver/web/note_client.dart index db62973..52e420a 100644 --- a/httpserver/web/note_client.dart +++ b/httpserver/web/note_client.dart @@ -6,6 +6,7 @@ // Use note_taker.html to run this script. import 'dart:html'; +import 'dart:convert' show jsonEncode; String note; @@ -31,7 +32,7 @@ void saveNote(Event e) { request.onReadyStateChange.listen(onData); request.open('POST', url); - request.send('{"myNote":"${noteTextInput.value}"}'); + request.send(jsonEncode({'myNote': noteTextInput.value})); } void requestNote(Event e) { @@ -43,7 +44,7 @@ void requestNote(Event e) { request.onReadyStateChange.listen(onData); request.open('POST', url); - request.send('{"getNote":"$getNoteNumber}"'); + request.send(jsonEncode({'getNote': getNoteNumber.toString()})); } void onData(_) { diff --git a/httpserver/web/note_taker.html b/httpserver/web/note_taker.html index 27cc7e2..67b1c3a 100644 --- a/httpserver/web/note_taker.html +++ b/httpserver/web/note_taker.html @@ -16,8 +16,7 @@ Write a Note - - + From 72eb7146c916dec73a609a26f4cc136e00a7d315 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 13:45:38 +1000 Subject: [PATCH 12/26] its_all_about_you --- its_all_about_you/.gitignore | 11 + its_all_about_you/analysis_options.yaml | 4 + its_all_about_you/pubspec.lock | 424 +++++++++++++++++++++++- its_all_about_you/pubspec.yaml | 13 +- its_all_about_you/web/index.html | 3 +- its_all_about_you/web/main.dart | 14 +- 6 files changed, 450 insertions(+), 19 deletions(-) create mode 100644 its_all_about_you/.gitignore create mode 100644 its_all_about_you/analysis_options.yaml diff --git a/its_all_about_you/.gitignore b/its_all_about_you/.gitignore new file mode 100644 index 0000000..50602ac --- /dev/null +++ b/its_all_about_you/.gitignore @@ -0,0 +1,11 @@ +# Files and directories created by pub +.dart_tool/ +.packages +# Remove the following pattern if you wish to check in your lock file +pubspec.lock + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/its_all_about_you/analysis_options.yaml b/its_all_about_you/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/its_all_about_you/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/its_all_about_you/pubspec.lock b/its_all_about_you/pubspec.lock index 968f26d..cbfd245 100644 --- a/its_all_about_you/pubspec.lock +++ b/its_all_about_you/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/its_all_about_you/pubspec.yaml b/its_all_about_you/pubspec.yaml index b9dbe06..b16c646 100644 --- a/its_all_about_you/pubspec.yaml +++ b/its_all_about_you/pubspec.yaml @@ -1,8 +1,11 @@ name: its_all_about_you description: A sample application -dependencies: - browser: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/fetchdata/ -gist: https://gist.github.com/Sfshaza/245c841595786300b3f4 -dartpad: https://dartpad.dartlang.org/245c841595786300b3f4 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/its_all_about_you/web/index.html b/its_all_about_you/web/index.html index 2d7a79c..40b46e8 100644 --- a/its_all_about_you/web/index.html +++ b/its_all_about_you/web/index.html @@ -13,8 +13,7 @@ It's All About You - - + diff --git a/its_all_about_you/web/main.dart b/its_all_about_you/web/main.dart index 9ccdbfb..fe8f385 100644 --- a/its_all_about_you/web/main.dart +++ b/its_all_about_you/web/main.dart @@ -71,7 +71,7 @@ void _populateFromJson() { } '''; - Map jsonData = JSON.decode(jsonDataAsString); + Map jsonData = json.decode(jsonDataAsString); favoriteNumber.value = jsonData['favoriteNumber'].toString(); valueOfPi.value = jsonData['valueOfPi'].toString(); @@ -106,10 +106,10 @@ void showJson(Event e) { // Convert everything to JSON and // display the results. - intAsJson.text = JSON.encode(favNum); - doubleAsJson.text = JSON.encode(pi); - boolAsJson.text = JSON.encode(chocolate); - stringAsJson.text = JSON.encode(sign); - listAsJson.text = JSON.encode(favoriteThings); - mapAsJson.text = JSON.encode(formData); + intAsJson.text = json.encode(favNum); + doubleAsJson.text = json.encode(pi); + boolAsJson.text = json.encode(chocolate); + stringAsJson.text = json.encode(sign); + listAsJson.text = json.encode(favoriteThings); + mapAsJson.text = json.encode(formData); } From 5c63b6427a468bd4f56398280a528e2ead71002d Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 13:53:55 +1000 Subject: [PATCH 13/26] mini --- mini/.gitignore | 9 + mini/analysis_options.yaml | 4 + mini/pubspec.lock | 424 ++++++++++++++++++++++++++++++++++++- mini/pubspec.yaml | 13 +- mini/web/index.html | 3 +- 5 files changed, 441 insertions(+), 12 deletions(-) create mode 100644 mini/.gitignore create mode 100644 mini/analysis_options.yaml diff --git a/mini/.gitignore b/mini/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/mini/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/mini/analysis_options.yaml b/mini/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/mini/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/mini/pubspec.lock b/mini/pubspec.lock index 968f26d..cbfd245 100644 --- a/mini/pubspec.lock +++ b/mini/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/mini/pubspec.yaml b/mini/pubspec.yaml index 30f478b..82c8604 100644 --- a/mini/pubspec.yaml +++ b/mini/pubspec.yaml @@ -1,8 +1,11 @@ name: mini description: A sample application -dependencies: - browser: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/connect-dart-html/ -gist: https://gist.github.com/Sfshaza/9832dbce44aecca3da56 -dartpad: https://dartpad.dartlang.org/9832dbce44aecca3da56 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.7.0 diff --git a/mini/web/index.html b/mini/web/index.html index 1fed269..a535d50 100644 --- a/mini/web/index.html +++ b/mini/web/index.html @@ -13,8 +13,7 @@ A Minimalist App - - + From 1084b4e47d718314370b1ee9e175d6f6c3cf286d Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 13:56:03 +1000 Subject: [PATCH 14/26] gitignores --- anagram/.gitignore | 2 - cmdline/.gitignore | 2 - futures/async-await-catch-error/.gitignore | 2 - futures/async-await-catch-error/pubspec.lock | 425 +++++++++++++++++++ futures/async-await/.gitignore | 2 - futures/futures-api-catch-error/.gitignore | 2 - futures/futures-api/.gitignore | 2 - futures/sequential-processing/.gitignore | 2 - futures/waiting-on-futures/.gitignore | 2 - helloworld/.gitignore | 2 - httpserver/.gitignore | 2 - its_all_about_you/.gitignore | 2 - 12 files changed, 425 insertions(+), 22 deletions(-) create mode 100644 futures/async-await-catch-error/pubspec.lock diff --git a/anagram/.gitignore b/anagram/.gitignore index 50602ac..3d64647 100644 --- a/anagram/.gitignore +++ b/anagram/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/cmdline/.gitignore b/cmdline/.gitignore index 50602ac..3d64647 100644 --- a/cmdline/.gitignore +++ b/cmdline/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/futures/async-await-catch-error/.gitignore b/futures/async-await-catch-error/.gitignore index 50602ac..3d64647 100644 --- a/futures/async-await-catch-error/.gitignore +++ b/futures/async-await-catch-error/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/futures/async-await-catch-error/pubspec.lock b/futures/async-await-catch-error/pubspec.lock new file mode 100644 index 0000000..cbfd245 --- /dev/null +++ b/futures/async-await-catch-error/pubspec.lock @@ -0,0 +1,425 @@ +# Generated by pub +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" +sdks: + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/futures/async-await/.gitignore b/futures/async-await/.gitignore index 50602ac..3d64647 100644 --- a/futures/async-await/.gitignore +++ b/futures/async-await/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/futures/futures-api-catch-error/.gitignore b/futures/futures-api-catch-error/.gitignore index 50602ac..3d64647 100644 --- a/futures/futures-api-catch-error/.gitignore +++ b/futures/futures-api-catch-error/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/futures/futures-api/.gitignore b/futures/futures-api/.gitignore index 50602ac..3d64647 100644 --- a/futures/futures-api/.gitignore +++ b/futures/futures-api/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/futures/sequential-processing/.gitignore b/futures/sequential-processing/.gitignore index 50602ac..3d64647 100644 --- a/futures/sequential-processing/.gitignore +++ b/futures/sequential-processing/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/futures/waiting-on-futures/.gitignore b/futures/waiting-on-futures/.gitignore index 50602ac..3d64647 100644 --- a/futures/waiting-on-futures/.gitignore +++ b/futures/waiting-on-futures/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/helloworld/.gitignore b/helloworld/.gitignore index 50602ac..3d64647 100644 --- a/helloworld/.gitignore +++ b/helloworld/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/httpserver/.gitignore b/httpserver/.gitignore index 6908e39..c0396f9 100644 --- a/httpserver/.gitignore +++ b/httpserver/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ diff --git a/its_all_about_you/.gitignore b/its_all_about_you/.gitignore index 50602ac..3d64647 100644 --- a/its_all_about_you/.gitignore +++ b/its_all_about_you/.gitignore @@ -1,8 +1,6 @@ # Files and directories created by pub .dart_tool/ .packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock # Conventional directory for build outputs build/ From cad21ec6e41486b263616f586d7c7922314f4c9d Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 14:00:44 +1000 Subject: [PATCH 15/26] mini_with_style --- mini_with_style/.gitignore | 9 + mini_with_style/analysis_options.yaml | 4 + mini_with_style/pubspec.lock | 424 +++++++++++++++++++++++++- mini_with_style/pubspec.yaml | 13 +- mini_with_style/web/index.html | 3 +- 5 files changed, 441 insertions(+), 12 deletions(-) create mode 100644 mini_with_style/.gitignore create mode 100644 mini_with_style/analysis_options.yaml diff --git a/mini_with_style/.gitignore b/mini_with_style/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/mini_with_style/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/mini_with_style/analysis_options.yaml b/mini_with_style/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/mini_with_style/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/mini_with_style/pubspec.lock b/mini_with_style/pubspec.lock index 968f26d..cbfd245 100644 --- a/mini_with_style/pubspec.lock +++ b/mini_with_style/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/mini_with_style/pubspec.yaml b/mini_with_style/pubspec.yaml index 0e0375d..c72f4d1 100644 --- a/mini_with_style/pubspec.yaml +++ b/mini_with_style/pubspec.yaml @@ -1,8 +1,11 @@ name: mini_with_style description: A sample application -dependencies: - browser: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/connect-dart-html/ -gist: https://gist.github.com/Sfshaza/ff2ccfff828813c34ffc -dartpad: https://dartpad.dartlang.org/ff2ccfff828813c34ffc + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/mini_with_style/web/index.html b/mini_with_style/web/index.html index 1c5d880..e2e1a4a 100644 --- a/mini_with_style/web/index.html +++ b/mini_with_style/web/index.html @@ -13,8 +13,7 @@ A Minimalist App - - + From 73cc27d4757e4700accf6984446147a50d93c01b Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 14:13:57 +1000 Subject: [PATCH 16/26] portmanteaux --- portmanteaux/.gitignore | 9 + portmanteaux/analysis_options.yaml | 9 + portmanteaux/pubspec.lock | 424 ++++++++++++++++++++++++++++- portmanteaux/pubspec.yaml | 13 +- portmanteaux/web/index.html | 3 +- portmanteaux/web/main.dart | 8 +- 6 files changed, 450 insertions(+), 16 deletions(-) create mode 100644 portmanteaux/.gitignore create mode 100644 portmanteaux/analysis_options.yaml diff --git a/portmanteaux/.gitignore b/portmanteaux/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/portmanteaux/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/portmanteaux/analysis_options.yaml b/portmanteaux/analysis_options.yaml new file mode 100644 index 0000000..454cc8f --- /dev/null +++ b/portmanteaux/analysis_options.yaml @@ -0,0 +1,9 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml + +analyzer: + strong-mode: + implicit-casts: false + implicit-dynamic: false diff --git a/portmanteaux/pubspec.lock b/portmanteaux/pubspec.lock index 968f26d..cbfd245 100644 --- a/portmanteaux/pubspec.lock +++ b/portmanteaux/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/portmanteaux/pubspec.yaml b/portmanteaux/pubspec.yaml index dcd3e50..8f8db54 100644 --- a/portmanteaux/pubspec.yaml +++ b/portmanteaux/pubspec.yaml @@ -1,8 +1,11 @@ name: portmanteaux description: A sample application -dependencies: - browser: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/fetchdata/ -gist: https://gist.github.com/Sfshaza/83f7779d18a8bbe8ccb1 -dartpad: https://dartpad.dartlang.org/83f7779d18a8bbe8ccb1 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/portmanteaux/web/index.html b/portmanteaux/web/index.html index a2ce700..ba5cd4d 100644 --- a/portmanteaux/web/index.html +++ b/portmanteaux/web/index.html @@ -13,8 +13,7 @@ Portmanteaux - - + diff --git a/portmanteaux/web/main.dart b/portmanteaux/web/main.dart index 5c854ba..edb0c8f 100644 --- a/portmanteaux/web/main.dart +++ b/portmanteaux/web/main.dart @@ -7,15 +7,15 @@ import 'dart:html'; import 'dart:convert'; -var wordList; +UListElement wordList; void main() { querySelector('#getWords').onClick.listen(makeRequest); - wordList = querySelector('#wordList'); + wordList = querySelector('#wordList') as UListElement; } void makeRequest(Event e) { - var path = 'https://www.dartlang.org/f/portmanteaux.json'; + var path = 'https://dart.dev/f/portmanteaux.json'; var httpRequest = new HttpRequest(); httpRequest ..open('GET', path) @@ -26,7 +26,7 @@ void makeRequest(Event e) { void requestComplete(HttpRequest request) { if (request.status == 200) { List portmanteaux = - JSON.decode(request.responseText) as List; + (json.decode(request.responseText) as List).cast(); for (int i = 0; i < portmanteaux.length; i++) { wordList.children.add(new LIElement()..text = portmanteaux[i]); } From 8a070260c53d86e9b093e9c02af3e3357a0a08f1 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 14:21:46 +1000 Subject: [PATCH 17/26] portmanteaux_simple/ --- portmanteaux_simple/.gitignore | 9 + portmanteaux_simple/analysis_options.yaml | 9 + portmanteaux_simple/pubspec.lock | 424 +++++++++++++++++++++- portmanteaux_simple/pubspec.yaml | 13 +- portmanteaux_simple/web/index.html | 3 +- portmanteaux_simple/web/main.dart | 10 +- 6 files changed, 451 insertions(+), 17 deletions(-) create mode 100644 portmanteaux_simple/.gitignore create mode 100644 portmanteaux_simple/analysis_options.yaml diff --git a/portmanteaux_simple/.gitignore b/portmanteaux_simple/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/portmanteaux_simple/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/portmanteaux_simple/analysis_options.yaml b/portmanteaux_simple/analysis_options.yaml new file mode 100644 index 0000000..454cc8f --- /dev/null +++ b/portmanteaux_simple/analysis_options.yaml @@ -0,0 +1,9 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml + +analyzer: + strong-mode: + implicit-casts: false + implicit-dynamic: false diff --git a/portmanteaux_simple/pubspec.lock b/portmanteaux_simple/pubspec.lock index 968f26d..cbfd245 100644 --- a/portmanteaux_simple/pubspec.lock +++ b/portmanteaux_simple/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/portmanteaux_simple/pubspec.yaml b/portmanteaux_simple/pubspec.yaml index 536c98e..882bb09 100644 --- a/portmanteaux_simple/pubspec.yaml +++ b/portmanteaux_simple/pubspec.yaml @@ -1,8 +1,11 @@ name: portmanteaux_simple description: A sample application -dependencies: - browser: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/fetchdata/ -gist: https://gist.github.com/Sfshaza/8640071ecb67b1309938 -dartpad: https://dartpad.dartlang.org/8640071ecb67b1309938 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/portmanteaux_simple/web/index.html b/portmanteaux_simple/web/index.html index a2ce700..ba5cd4d 100644 --- a/portmanteaux_simple/web/index.html +++ b/portmanteaux_simple/web/index.html @@ -13,8 +13,7 @@ Portmanteaux - - + diff --git a/portmanteaux_simple/web/main.dart b/portmanteaux_simple/web/main.dart index cd11562..75a348f 100644 --- a/portmanteaux_simple/web/main.dart +++ b/portmanteaux_simple/web/main.dart @@ -8,25 +8,25 @@ import 'dart:async'; import 'dart:convert'; import 'dart:html'; -var wordList; +UListElement wordList; void main() { querySelector('#getWords').onClick.listen(makeRequest); - wordList = querySelector('#wordList'); + wordList = querySelector('#wordList') as UListElement; } Future makeRequest(Event e) async { - var path = 'https://www.dartlang.org/f/portmanteaux.json'; + var path = 'https://dart.dev/f/portmanteaux.json'; try { processString(await HttpRequest.getString(path)); } catch (e) { - print('Couldn\'t open $path'); + print('Couldn\'t open $path: $e'); handleError(e); } } void processString(String jsonString) { - List portmanteaux = JSON.decode(jsonString) as List; + List portmanteaux = (json.decode(jsonString) as List).cast(); for (int i = 0; i < portmanteaux.length; i++) { wordList.children.add(new LIElement()..text = portmanteaux[i]); } From 01b860e7b0bbf828de87eb36d16e6f655bbc2632 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 14:26:30 +1000 Subject: [PATCH 18/26] search_form --- search_form/.gitignore | 9 + search_form/analysis_options.yaml | 4 + search_form/pubspec.lock | 424 +++++++++++++++++++++++++++++- search_form/pubspec.yaml | 13 +- search_form/web/index.html | 4 +- 5 files changed, 442 insertions(+), 12 deletions(-) create mode 100644 search_form/.gitignore create mode 100644 search_form/analysis_options.yaml diff --git a/search_form/.gitignore b/search_form/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/search_form/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/search_form/analysis_options.yaml b/search_form/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/search_form/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/search_form/pubspec.lock b/search_form/pubspec.lock index 968f26d..cbfd245 100644 --- a/search_form/pubspec.lock +++ b/search_form/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/search_form/pubspec.yaml b/search_form/pubspec.yaml index 9236bd0..7230838 100644 --- a/search_form/pubspec.yaml +++ b/search_form/pubspec.yaml @@ -1,8 +1,11 @@ name: search_form description: A sample application -dependencies: - browser: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/forms/ -gist: https://gist.github.com/Sfshaza/67ea796c640ee0328483 -dartpad: https://dartpad.dartlang.org/67ea796c640ee0328483 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/search_form/web/index.html b/search_form/web/index.html index 39bccad..f559446 100644 --- a/search_form/web/index.html +++ b/search_form/web/index.html @@ -15,7 +15,7 @@ -

Search dartlang.org

+

Search dart.dev

Search dartlang.org
From b10c11859aab0790afa7e262861940ba246b2a97 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 14:45:00 +1000 Subject: [PATCH 19/26] last_positive --- streams/last_positive/.gitignore | 9 + streams/last_positive/analysis_options.yaml | 4 + streams/last_positive/{web => bin}/main.dart | 0 streams/last_positive/pubspec.lock | 339 ++++++++++++++++++- streams/last_positive/pubspec.yaml | 12 +- 5 files changed, 355 insertions(+), 9 deletions(-) create mode 100644 streams/last_positive/.gitignore create mode 100644 streams/last_positive/analysis_options.yaml rename streams/last_positive/{web => bin}/main.dart (100%) diff --git a/streams/last_positive/.gitignore b/streams/last_positive/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/streams/last_positive/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/streams/last_positive/analysis_options.yaml b/streams/last_positive/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/streams/last_positive/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/streams/last_positive/web/main.dart b/streams/last_positive/bin/main.dart similarity index 100% rename from streams/last_positive/web/main.dart rename to streams/last_positive/bin/main.dart diff --git a/streams/last_positive/pubspec.lock b/streams/last_positive/pubspec.lock index 8eba934..3f86b3b 100644 --- a/streams/last_positive/pubspec.lock +++ b/streams/last_positive/pubspec.lock @@ -1,17 +1,348 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.36.3" args: + dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" collection: + dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "0.9.4" + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.0" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.18" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.0+2" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.18" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + multi_server_socket: + dependency: transitive + description: + name: multi_server_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.4" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.8" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.5" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.4" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + vm_service_client: + dependency: transitive + description: + name: vm_service_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6+2" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.0.0 <2.0.0" + dart: ">=2.2.0 <3.0.0" diff --git a/streams/last_positive/pubspec.yaml b/streams/last_positive/pubspec.yaml index 1cd6b74..6647702 100644 --- a/streams/last_positive/pubspec.yaml +++ b/streams/last_positive/pubspec.yaml @@ -1,8 +1,10 @@ name: last_positive description: A simple app that reads from an integer stream and reports the last positive value from the stream. -dependencies: - args: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/streams/ -gist: https://gist.github.com/Sfshaza/da80b1e7eed75db53ef3 -dartpad: https://dartpad.dartlang.org/da80b1e7eed75db53ef3 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + pedantic: ^1.0.0 + test: ^1.0.0 From 909c92e1a5a60fbee96bfce009dbe93d27bddebf Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 15:00:16 +1000 Subject: [PATCH 20/26] streams --- streams/README.txt | 6 - streams/read_file/.gitignore | 9 + streams/read_file/analysis_options.yaml | 4 + streams/read_file/bin/main.dart | 9 +- streams/read_file/pubspec.lock | 339 ++++++++++++++++++- streams/read_file/pubspec.yaml | 10 +- streams/simple_stream/.gitignore | 9 + streams/simple_stream/analysis_options.yaml | 4 + streams/simple_stream/{web => bin}/main.dart | 0 streams/simple_stream/pubspec.lock | 339 ++++++++++++++++++- streams/simple_stream/pubspec.yaml | 12 +- streams/throw_error/.gitignore | 9 + streams/throw_error/analysis_options.yaml | 4 + streams/throw_error/{web => bin}/main.dart | 0 streams/throw_error/pubspec.lock | 339 ++++++++++++++++++- streams/throw_error/pubspec.yaml | 12 +- 16 files changed, 1072 insertions(+), 33 deletions(-) delete mode 100644 streams/README.txt create mode 100644 streams/read_file/.gitignore create mode 100644 streams/read_file/analysis_options.yaml create mode 100644 streams/simple_stream/.gitignore create mode 100644 streams/simple_stream/analysis_options.yaml rename streams/simple_stream/{web => bin}/main.dart (100%) create mode 100644 streams/throw_error/.gitignore create mode 100644 streams/throw_error/analysis_options.yaml rename streams/throw_error/{web => bin}/main.dart (100%) diff --git a/streams/README.txt b/streams/README.txt deleted file mode 100644 index c4e8561..0000000 --- a/streams/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -The source code for most of these examples is under /web -directories but could just as easily be under bin/ directories, -because most of these examples don't rely on dart:io. - -The one exception is "read_file", which relies on dart:io. - diff --git a/streams/read_file/.gitignore b/streams/read_file/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/streams/read_file/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/streams/read_file/analysis_options.yaml b/streams/read_file/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/streams/read_file/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/streams/read_file/bin/main.dart b/streams/read_file/bin/main.dart index 57f3737..3aa007e 100644 --- a/streams/read_file/bin/main.dart +++ b/streams/read_file/bin/main.dart @@ -7,10 +7,15 @@ import 'dart:io'; import 'dart:async'; import 'dart:convert'; -Future main(args) async { +Future main(List args) async { + if (args.isEmpty) { + print("Requires a filepath as the first argument"); + return; + } + var file = new File(args[0]); var lines = - file.openRead().transform(UTF8.decoder).transform(const LineSplitter()); + file.openRead().transform(utf8.decoder).transform(const LineSplitter()); await for (var line in lines) { if (!line.startsWith('#')) { print(line); diff --git a/streams/read_file/pubspec.lock b/streams/read_file/pubspec.lock index 8eba934..3f86b3b 100644 --- a/streams/read_file/pubspec.lock +++ b/streams/read_file/pubspec.lock @@ -1,17 +1,348 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.36.3" args: + dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" collection: + dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "0.9.4" + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.0" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.18" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.0+2" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.18" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + multi_server_socket: + dependency: transitive + description: + name: multi_server_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.4" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.8" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.5" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.4" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + vm_service_client: + dependency: transitive + description: + name: vm_service_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6+2" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.0.0 <2.0.0" + dart: ">=2.2.0 <3.0.0" diff --git a/streams/read_file/pubspec.yaml b/streams/read_file/pubspec.yaml index a3f7f08..54cbf4d 100644 --- a/streams/read_file/pubspec.yaml +++ b/streams/read_file/pubspec.yaml @@ -1,6 +1,10 @@ name: read_file description: A simple app that reads a file (specified on the command line), decodes, and prints it out. -dependencies: - args: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/streams/ + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + pedantic: ^1.0.0 + test: ^1.0.0 diff --git a/streams/simple_stream/.gitignore b/streams/simple_stream/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/streams/simple_stream/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/streams/simple_stream/analysis_options.yaml b/streams/simple_stream/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/streams/simple_stream/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/streams/simple_stream/web/main.dart b/streams/simple_stream/bin/main.dart similarity index 100% rename from streams/simple_stream/web/main.dart rename to streams/simple_stream/bin/main.dart diff --git a/streams/simple_stream/pubspec.lock b/streams/simple_stream/pubspec.lock index 8eba934..3f86b3b 100644 --- a/streams/simple_stream/pubspec.lock +++ b/streams/simple_stream/pubspec.lock @@ -1,17 +1,348 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.36.3" args: + dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" collection: + dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "0.9.4" + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.0" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.18" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.0+2" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.18" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + multi_server_socket: + dependency: transitive + description: + name: multi_server_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.4" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.8" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.5" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.4" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + vm_service_client: + dependency: transitive + description: + name: vm_service_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6+2" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.0.0 <2.0.0" + dart: ">=2.2.0 <3.0.0" diff --git a/streams/simple_stream/pubspec.yaml b/streams/simple_stream/pubspec.yaml index ac78a86..a9eb9b7 100644 --- a/streams/simple_stream/pubspec.yaml +++ b/streams/simple_stream/pubspec.yaml @@ -1,8 +1,10 @@ name: simple_stream description: A simple application that reads integers from a stream and adds their values together. -dependencies: - args: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/streams/ -gist: https://gist.github.com/Sfshaza/15d5ef986238c97dbc14 -dartpad: https://dartpad.dartlang.org/15d5ef986238c97dbc14 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + pedantic: ^1.0.0 + test: ^1.0.0 diff --git a/streams/throw_error/.gitignore b/streams/throw_error/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/streams/throw_error/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/streams/throw_error/analysis_options.yaml b/streams/throw_error/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/streams/throw_error/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/streams/throw_error/web/main.dart b/streams/throw_error/bin/main.dart similarity index 100% rename from streams/throw_error/web/main.dart rename to streams/throw_error/bin/main.dart diff --git a/streams/throw_error/pubspec.lock b/streams/throw_error/pubspec.lock index 8eba934..3f86b3b 100644 --- a/streams/throw_error/pubspec.lock +++ b/streams/throw_error/pubspec.lock @@ -1,17 +1,348 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.36.3" args: + dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" collection: + dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "0.9.4" + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.0" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.18" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.0+2" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.18" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + multi_server_socket: + dependency: transitive + description: + name: multi_server_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.4" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.8" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.5" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.4" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + vm_service_client: + dependency: transitive + description: + name: vm_service_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6+2" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.0.0 <2.0.0" + dart: ">=2.2.0 <3.0.0" diff --git a/streams/throw_error/pubspec.yaml b/streams/throw_error/pubspec.yaml index f4bf29b..b2addbf 100644 --- a/streams/throw_error/pubspec.yaml +++ b/streams/throw_error/pubspec.yaml @@ -1,8 +1,10 @@ name: throw_error description: A simple app that reads from a stream and throws an error when the loop iterator equals 4. -dependencies: - args: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/streams/ -gist: https://gist.github.com/Sfshaza/38feef09be9b1e7b5136 -dartpad: https://dartpad.dartlang.org/38feef09be9b1e7b5136 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + pedantic: ^1.0.0 + test: ^1.0.0 From c17db84f85e76c4c9a2eded6eee0675bca5fbf5c Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 15:04:05 +1000 Subject: [PATCH 21/26] todo --- todo/.gitignore | 9 + todo/analysis_options.yaml | 4 + todo/pubspec.lock | 424 ++++++++++++++++++++++++++++++++++++- todo/pubspec.yaml | 12 +- todo/web/index.html | 3 +- 5 files changed, 440 insertions(+), 12 deletions(-) create mode 100644 todo/.gitignore create mode 100644 todo/analysis_options.yaml diff --git a/todo/.gitignore b/todo/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/todo/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/todo/analysis_options.yaml b/todo/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/todo/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/todo/pubspec.lock b/todo/pubspec.lock index 968f26d..cbfd245 100644 --- a/todo/pubspec.lock +++ b/todo/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/todo/pubspec.yaml b/todo/pubspec.yaml index 1e0f729..d8c3ba9 100644 --- a/todo/pubspec.yaml +++ b/todo/pubspec.yaml @@ -1,8 +1,10 @@ name: todo description: A sample application -dependencies: - browser: ^0.10.0 -homepage: https://www.dartlang.org/docs/tutorials/add-elements/ -gist: https://gist.github.com/Sfshaza/65c90ff6b078c332d4b6 -dartpad: https://dartpad.dartlang.org/65c90ff6b078c332d4b6 +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/todo/web/index.html b/todo/web/index.html index 7d6bc5c..19a8970 100644 --- a/todo/web/index.html +++ b/todo/web/index.html @@ -13,8 +13,7 @@ Todo - - + From 805eb8712b4faa667858293969a36020b69b3479 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 15:10:31 +1000 Subject: [PATCH 22/26] todo_with_delete --- todo_with_delete/.gitignore | 9 + todo_with_delete/analysis_options.yaml | 4 + todo_with_delete/pubspec.lock | 424 ++++++++++++++++++++++++- todo_with_delete/pubspec.yaml | 13 +- todo_with_delete/web/index.html | 3 +- 5 files changed, 441 insertions(+), 12 deletions(-) create mode 100644 todo_with_delete/.gitignore create mode 100644 todo_with_delete/analysis_options.yaml diff --git a/todo_with_delete/.gitignore b/todo_with_delete/.gitignore new file mode 100644 index 0000000..3d64647 --- /dev/null +++ b/todo_with_delete/.gitignore @@ -0,0 +1,9 @@ +# Files and directories created by pub +.dart_tool/ +.packages + +# Conventional directory for build outputs +build/ + +# Directory created by dartdoc +doc/api/ diff --git a/todo_with_delete/analysis_options.yaml b/todo_with_delete/analysis_options.yaml new file mode 100644 index 0000000..d520978 --- /dev/null +++ b/todo_with_delete/analysis_options.yaml @@ -0,0 +1,4 @@ +# Defines a default set of lint rules enforced for +# projects at Google. For details and rationale, +# see https://github.com/dart-lang/pedantic#enabled-lints. +include: package:pedantic/analysis_options.yaml diff --git a/todo_with_delete/pubspec.lock b/todo_with_delete/pubspec.lock index 968f26d..cbfd245 100644 --- a/todo_with_delete/pubspec.lock +++ b/todo_with_delete/pubspec.lock @@ -1,11 +1,425 @@ # Generated by pub -# See http://pub.dartlang.org/doc/glossary.html#lockfile +# See https://www.dartlang.org/tools/pub/glossary#lockfile packages: - browser: + analyzer: + dependency: transitive description: - name: browser + name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.10.0+2" + version: "0.35.4" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.21" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_modules: + dependency: transitive + description: + name: build_modules + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "6.6.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + front_end: + dependency: transitive + description: + name: front_end + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.14" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.0+2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + kernel: + dependency: transitive + description: + name: kernel + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.14" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.3+2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.7" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + package_resolver: + dependency: transitive + description: + name: package_resolver + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.10" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.12" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.2" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + scratch_space: + dependency: transitive + description: + name: scratch_space + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.3+2" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.8" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.19" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+1" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+10" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.13" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.16" sdks: - dart: ">=1.3.0-dev.4.1 <2.0.0" + dart: ">=2.3.0-dev.0.1 <3.0.0" diff --git a/todo_with_delete/pubspec.yaml b/todo_with_delete/pubspec.yaml index 6aed81d..bd5e948 100644 --- a/todo_with_delete/pubspec.yaml +++ b/todo_with_delete/pubspec.yaml @@ -1,8 +1,11 @@ name: todo_with_delete description: A sample application -dependencies: - browser: ^0.10.0 - homepage: https://www.dartlang.org/docs/tutorials/remove-elements/ -gist: https://gist.github.com/Sfshaza/582b9a8d36786566ba08 -dartpad: https://dartpad.dartlang.org/582b9a8d36786566ba08 + +environment: + sdk: '>=2.2.0 <3.0.0' + +dev_dependencies: + build_runner: ^1.1.2 + build_web_compilers: ^1.0.0 + pedantic: ^1.0.0 diff --git a/todo_with_delete/web/index.html b/todo_with_delete/web/index.html index 5096473..adae38e 100644 --- a/todo_with_delete/web/index.html +++ b/todo_with_delete/web/index.html @@ -13,8 +13,7 @@ Todo - - + From 86261d5651103a0c3ea56a174d106de4814e10bf Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 19 Jun 2019 15:22:35 +1000 Subject: [PATCH 23/26] Updating documentation URLs --- anagram/pubspec.yaml | 2 +- cmdline/pubspec.yaml | 2 +- futures/README.txt | 5 ----- futures/async-await-catch-error/pubspec.yaml | 2 +- futures/async-await/pubspec.yaml | 2 +- futures/futures-api-catch-error/pubspec.yaml | 2 +- futures/futures-api/pubspec.yaml | 2 +- futures/sequential-processing/pubspec.yaml | 2 +- futures/waiting-on-futures/pubspec.yaml | 2 +- helloworld/pubspec.yaml | 2 +- httpserver/pubspec.yaml | 2 +- its_all_about_you/pubspec.yaml | 2 +- mini/pubspec.yaml | 2 +- mini_with_style/pubspec.yaml | 2 +- portmanteaux/pubspec.yaml | 2 +- portmanteaux_simple/pubspec.yaml | 2 +- search_form/pubspec.yaml | 1 - streams/last_positive/pubspec.yaml | 2 +- streams/read_file/pubspec.yaml | 2 +- streams/simple_stream/pubspec.yaml | 2 +- streams/throw_error/pubspec.yaml | 2 +- todo/pubspec.yaml | 1 + todo_with_delete/pubspec.yaml | 2 +- 23 files changed, 21 insertions(+), 26 deletions(-) delete mode 100644 futures/README.txt diff --git a/anagram/pubspec.yaml b/anagram/pubspec.yaml index 3f768fa..9c4f7a8 100644 --- a/anagram/pubspec.yaml +++ b/anagram/pubspec.yaml @@ -10,4 +10,4 @@ dev_dependencies: build_web_compilers: ^1.0.0 pedantic: ^1.7.0 -homepage: https://www.dartlang.org/docs/tutorials/add-elements/ +homepage: https://dart.dev/tutorials/web/low-level-html/add-elements diff --git a/cmdline/pubspec.yaml b/cmdline/pubspec.yaml index 259dabb..c1adaac 100644 --- a/cmdline/pubspec.yaml +++ b/cmdline/pubspec.yaml @@ -16,7 +16,7 @@ executables: dcat: dgrep: -homepage: https://www.dartlang.org/tutorials/server/cmdline +homepage: https://dart.dev/tutorials/server/cmdline diff --git a/futures/README.txt b/futures/README.txt deleted file mode 100644 index fe9604a..0000000 --- a/futures/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -The source code for most of these examples is under web/ -directories but could just as easily be under bin/ directories. -In fact, if these examples were rewritten to use dart:io -for reading files, they would have to be placed under bin/. - diff --git a/futures/async-await-catch-error/pubspec.yaml b/futures/async-await-catch-error/pubspec.yaml index 5e0a9be..b847561 100644 --- a/futures/async-await-catch-error/pubspec.yaml +++ b/futures/async-await-catch-error/pubspec.yaml @@ -1,6 +1,6 @@ name: async_await_catch_error description: A sample application that reads a file on dartlang using async/await, and prints the contents; errors are caught. -homepage: https://www.dartlang.org/docs/tutorials/futures/ +homepage: https://dart.dev/tutorials/language/futures environment: sdk: '>=2.2.0 <3.0.0' diff --git a/futures/async-await/pubspec.yaml b/futures/async-await/pubspec.yaml index d6463ee..e09ad82 100644 --- a/futures/async-await/pubspec.yaml +++ b/futures/async-await/pubspec.yaml @@ -1,6 +1,6 @@ name: async_await description: A sample application that reads a file on dartlang using async/await, and prints the contents. -homepage: https://www.dartlang.org/docs/tutorials/futures/ +homepage: https://dart.dev/tutorials/language/futures environment: sdk: '>=2.2.0 <3.0.0' diff --git a/futures/futures-api-catch-error/pubspec.yaml b/futures/futures-api-catch-error/pubspec.yaml index 0bb2f94..00672f4 100644 --- a/futures/futures-api-catch-error/pubspec.yaml +++ b/futures/futures-api-catch-error/pubspec.yaml @@ -1,6 +1,6 @@ name: futures_api_catch_error description: A sample application that reads a file on dartlang using the Futures API, and prints the contents; errors are caught. -homepage: https://www.dartlang.org/docs/tutorials/futures/ +homepage: https://dart.dev/tutorials/language/futures environment: sdk: '>=2.2.0 <3.0.0' diff --git a/futures/futures-api/pubspec.yaml b/futures/futures-api/pubspec.yaml index fd9b24a..fdcda73 100644 --- a/futures/futures-api/pubspec.yaml +++ b/futures/futures-api/pubspec.yaml @@ -1,6 +1,6 @@ name: futures_api description: A sample application that reads a file on dartlang using the Futures API, and prints the contents. -homepage: https://www.dartlang.org/docs/tutorials/futures/ +homepage: https://dart.dev/tutorials/language/futures environment: sdk: '>=2.2.0 <3.0.0' diff --git a/futures/sequential-processing/pubspec.yaml b/futures/sequential-processing/pubspec.yaml index 9181f7d..fde567d 100644 --- a/futures/sequential-processing/pubspec.yaml +++ b/futures/sequential-processing/pubspec.yaml @@ -1,6 +1,6 @@ name: sequential_processing description: A sample application that performs time consuming operations sequentially. -homepage: https://www.dartlang.org/docs/tutorials/futures/ +homepage: https://dart.dev/tutorials/language/futures environment: sdk: '>=2.2.0 <3.0.0' diff --git a/futures/waiting-on-futures/pubspec.yaml b/futures/waiting-on-futures/pubspec.yaml index 12a4abd..e264f4f 100644 --- a/futures/waiting-on-futures/pubspec.yaml +++ b/futures/waiting-on-futures/pubspec.yaml @@ -1,6 +1,6 @@ name: waiting_on_futures description: A sample application that triggers three functions and waits until all are finished. -homepage: https://www.dartlang.org/docs/tutorials/futures/ +homepage: https://dart.dev/tutorials/language/futures environment: sdk: '>=2.2.0 <3.0.0' diff --git a/helloworld/pubspec.yaml b/helloworld/pubspec.yaml index e68b305..58a2196 100644 --- a/helloworld/pubspec.yaml +++ b/helloworld/pubspec.yaml @@ -1,6 +1,6 @@ name: helloworld description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/cmdline/ +homepage: https://dart.dev/tutorials/server/cmdline environment: sdk: '>=2.2.0 <3.0.0' diff --git a/httpserver/pubspec.yaml b/httpserver/pubspec.yaml index 5aa7fea..57ad68b 100644 --- a/httpserver/pubspec.yaml +++ b/httpserver/pubspec.yaml @@ -1,6 +1,6 @@ name: httpserver description: Sample HTTP clients and servers -homepage: https://www.dartlang.org/docs/tutorials/httpserver/ +homepage: https://dart.dev/tutorials/server/httpserver environment: sdk: '>=2.2.0 <3.0.0' diff --git a/its_all_about_you/pubspec.yaml b/its_all_about_you/pubspec.yaml index b16c646..4e03efd 100644 --- a/its_all_about_you/pubspec.yaml +++ b/its_all_about_you/pubspec.yaml @@ -1,6 +1,6 @@ name: its_all_about_you description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/fetchdata/ +homepage: https://dart.dev/tutorials/web/fetch-data environment: sdk: '>=2.2.0 <3.0.0' diff --git a/mini/pubspec.yaml b/mini/pubspec.yaml index 82c8604..58b2f18 100644 --- a/mini/pubspec.yaml +++ b/mini/pubspec.yaml @@ -1,6 +1,6 @@ name: mini description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/connect-dart-html/ +homepage: https://dart.dev/tutorials/web/low-level-html/connect-dart-html environment: sdk: '>=2.2.0 <3.0.0' diff --git a/mini_with_style/pubspec.yaml b/mini_with_style/pubspec.yaml index c72f4d1..af14dde 100644 --- a/mini_with_style/pubspec.yaml +++ b/mini_with_style/pubspec.yaml @@ -1,6 +1,6 @@ name: mini_with_style description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/connect-dart-html/ +homepage: https://dart.dev/tutorials/web/low-level-html/connect-dart-html environment: sdk: '>=2.2.0 <3.0.0' diff --git a/portmanteaux/pubspec.yaml b/portmanteaux/pubspec.yaml index 8f8db54..dbd84c9 100644 --- a/portmanteaux/pubspec.yaml +++ b/portmanteaux/pubspec.yaml @@ -1,6 +1,6 @@ name: portmanteaux description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/fetchdata/ +homepage: https://dart.dev/tutorials/web/fetch-data environment: sdk: '>=2.2.0 <3.0.0' diff --git a/portmanteaux_simple/pubspec.yaml b/portmanteaux_simple/pubspec.yaml index 882bb09..9d3b20a 100644 --- a/portmanteaux_simple/pubspec.yaml +++ b/portmanteaux_simple/pubspec.yaml @@ -1,6 +1,6 @@ name: portmanteaux_simple description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/fetchdata/ +homepage: https://dart.dev/tutorials/web/fetch-data environment: sdk: '>=2.2.0 <3.0.0' diff --git a/search_form/pubspec.yaml b/search_form/pubspec.yaml index 7230838..935e5b2 100644 --- a/search_form/pubspec.yaml +++ b/search_form/pubspec.yaml @@ -1,6 +1,5 @@ name: search_form description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/forms/ environment: sdk: '>=2.2.0 <3.0.0' diff --git a/streams/last_positive/pubspec.yaml b/streams/last_positive/pubspec.yaml index 6647702..ae09a41 100644 --- a/streams/last_positive/pubspec.yaml +++ b/streams/last_positive/pubspec.yaml @@ -1,6 +1,6 @@ name: last_positive description: A simple app that reads from an integer stream and reports the last positive value from the stream. -homepage: https://www.dartlang.org/docs/tutorials/streams/ +homepage: https://dart.dev/tutorials/language/streams environment: sdk: '>=2.2.0 <3.0.0' diff --git a/streams/read_file/pubspec.yaml b/streams/read_file/pubspec.yaml index 54cbf4d..f91ac4c 100644 --- a/streams/read_file/pubspec.yaml +++ b/streams/read_file/pubspec.yaml @@ -1,6 +1,6 @@ name: read_file description: A simple app that reads a file (specified on the command line), decodes, and prints it out. -homepage: https://www.dartlang.org/docs/tutorials/streams/ +homepage: https://dart.dev/tutorials/language/streams environment: sdk: '>=2.2.0 <3.0.0' diff --git a/streams/simple_stream/pubspec.yaml b/streams/simple_stream/pubspec.yaml index a9eb9b7..4790d56 100644 --- a/streams/simple_stream/pubspec.yaml +++ b/streams/simple_stream/pubspec.yaml @@ -1,6 +1,6 @@ name: simple_stream description: A simple application that reads integers from a stream and adds their values together. -homepage: https://www.dartlang.org/docs/tutorials/streams/ +homepage: https://dart.dev/tutorials/language/streams environment: sdk: '>=2.2.0 <3.0.0' diff --git a/streams/throw_error/pubspec.yaml b/streams/throw_error/pubspec.yaml index b2addbf..ed97ccd 100644 --- a/streams/throw_error/pubspec.yaml +++ b/streams/throw_error/pubspec.yaml @@ -1,6 +1,6 @@ name: throw_error description: A simple app that reads from a stream and throws an error when the loop iterator equals 4. -homepage: https://www.dartlang.org/docs/tutorials/streams/ +homepage: https://dart.dev/tutorials/language/streams environment: sdk: '>=2.2.0 <3.0.0' diff --git a/todo/pubspec.yaml b/todo/pubspec.yaml index d8c3ba9..a6b38ce 100644 --- a/todo/pubspec.yaml +++ b/todo/pubspec.yaml @@ -1,5 +1,6 @@ name: todo description: A sample application +homepage: https://dart.dev/tutorials/web/low-level-html/add-elements environment: sdk: '>=2.2.0 <3.0.0' diff --git a/todo_with_delete/pubspec.yaml b/todo_with_delete/pubspec.yaml index bd5e948..1c608a5 100644 --- a/todo_with_delete/pubspec.yaml +++ b/todo_with_delete/pubspec.yaml @@ -1,6 +1,6 @@ name: todo_with_delete description: A sample application -homepage: https://www.dartlang.org/docs/tutorials/remove-elements/ +homepage: https://dart.dev/tutorials/web/low-level-html/remove-elements environment: sdk: '>=2.2.0 <3.0.0' From 39168f258997c96c82fc0a755aa2eb7ad20b47fe Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Fri, 21 Jun 2019 09:15:42 +1000 Subject: [PATCH 24/26] Fixes from review --- anagram/analysis_options.yaml | 4 +++ anagram/pubspec.lock | 8 ++--- anagram/pubspec.yaml | 10 +++---- anagram/web/main.dart | 4 +-- analysis_options.yaml | 1 - cmdline/analysis_options.yaml | 12 ++------ cmdline/bin/dcat.dart | 6 ++-- cmdline/bin/dgrep.dart | 8 +++-- cmdline/pubspec.lock | 30 +++++++++---------- cmdline/pubspec.yaml | 8 ++--- .../analysis_options.yaml | 4 +++ futures/async-await-catch-error/pubspec.lock | 8 ++--- futures/async-await-catch-error/pubspec.yaml | 6 ++-- futures/async-await-catch-error/web/main.dart | 10 +++---- futures/async-await/analysis_options.yaml | 4 +++ futures/async-await/pubspec.lock | 8 ++--- futures/async-await/pubspec.yaml | 6 ++-- futures/async-await/web/main.dart | 8 ++--- .../analysis_options.yaml | 4 +++ futures/futures-api-catch-error/pubspec.lock | 8 ++--- futures/futures-api-catch-error/pubspec.yaml | 8 ++--- futures/futures-api-catch-error/web/main.dart | 8 ++--- futures/futures-api/analysis_options.yaml | 4 +++ futures/futures-api/pubspec.lock | 8 ++--- futures/futures-api/pubspec.yaml | 6 ++-- futures/futures-api/web/main.dart | 8 ++--- .../analysis_options.yaml | 4 +++ futures/sequential-processing/pubspec.lock | 8 ++--- futures/sequential-processing/pubspec.yaml | 6 ++-- futures/sequential-processing/web/main.dart | 6 ++-- .../waiting-on-futures/analysis_options.yaml | 4 +++ futures/waiting-on-futures/pubspec.lock | 8 ++--- futures/waiting-on-futures/pubspec.yaml | 6 ++-- futures/waiting-on-futures/web/main.dart | 8 ++--- helloworld/analysis_options.yaml | 4 +++ helloworld/pubspec.lock | 2 +- helloworld/pubspec.yaml | 2 +- httpserver/analysis_options.yaml | 4 +++ httpserver/bin/basic_file_server.dart | 4 +-- httpserver/bin/basic_writer_client.dart | 4 +-- httpserver/bin/basic_writer_server.dart | 6 ++-- httpserver/bin/hello_world_server_secure.dart | 4 +-- httpserver/bin/mini_file_server.dart | 4 +-- httpserver/bin/note_server.dart | 8 ++--- httpserver/bin/number_guesser.dart | 6 ++-- httpserver/bin/number_thinker.dart | 2 +- httpserver/bin/static_file_server.dart | 4 +-- httpserver/pubspec.lock | 10 +++---- httpserver/pubspec.yaml | 6 ++-- httpserver/test/httpserver_test.dart | 3 +- httpserver/web/note_client.dart | 2 +- its_all_about_you/analysis_options.yaml | 4 +++ its_all_about_you/pubspec.lock | 8 ++--- its_all_about_you/pubspec.yaml | 8 ++--- its_all_about_you/web/main.dart | 14 ++++----- mini/analysis_options.yaml | 4 +++ mini/pubspec.lock | 8 ++--- mini/pubspec.yaml | 6 ++-- mini_with_style/analysis_options.yaml | 4 +++ mini_with_style/pubspec.lock | 8 ++--- mini_with_style/pubspec.yaml | 8 ++--- portmanteaux/analysis_options.yaml | 7 ++--- portmanteaux/pubspec.lock | 8 ++--- portmanteaux/pubspec.yaml | 8 ++--- portmanteaux/web/main.dart | 4 +-- portmanteaux_simple/analysis_options.yaml | 7 ++--- portmanteaux_simple/pubspec.lock | 8 ++--- portmanteaux_simple/pubspec.yaml | 8 ++--- portmanteaux_simple/web/main.dart | 4 +-- search_form/analysis_options.yaml | 4 +++ search_form/pubspec.lock | 8 ++--- search_form/pubspec.yaml | 8 ++--- streams/last_positive/analysis_options.yaml | 4 +++ streams/last_positive/pubspec.lock | 4 +-- streams/last_positive/pubspec.yaml | 6 ++-- streams/read_file/analysis_options.yaml | 4 +++ streams/read_file/pubspec.lock | 4 +-- streams/read_file/pubspec.yaml | 6 ++-- streams/simple_stream/analysis_options.yaml | 4 +++ streams/simple_stream/bin/main.dart | 2 +- streams/simple_stream/pubspec.lock | 4 +-- streams/simple_stream/pubspec.yaml | 6 ++-- streams/throw_error/analysis_options.yaml | 4 +++ streams/throw_error/bin/main.dart | 2 +- streams/throw_error/pubspec.lock | 4 +-- streams/throw_error/pubspec.yaml | 6 ++-- todo/analysis_options.yaml | 4 +++ todo/pubspec.lock | 8 ++--- todo/pubspec.yaml | 8 ++--- todo_with_delete/analysis_options.yaml | 4 +++ todo_with_delete/pubspec.lock | 8 ++--- todo_with_delete/pubspec.yaml | 8 ++--- 92 files changed, 316 insertions(+), 254 deletions(-) diff --git a/anagram/analysis_options.yaml b/anagram/analysis_options.yaml index d520978..b8517e8 100644 --- a/anagram/analysis_options.yaml +++ b/anagram/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/anagram/pubspec.lock b/anagram/pubspec.lock index cbfd245..73c55bf 100644 --- a/anagram/pubspec.lock +++ b/anagram/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/anagram/pubspec.yaml b/anagram/pubspec.yaml index 9c4f7a8..d1835fb 100644 --- a/anagram/pubspec.yaml +++ b/anagram/pubspec.yaml @@ -1,13 +1,11 @@ name: anagram description: A sample application +homepage: https://dart.dev/tutorials/web/low-level-html/add-elements environment: - sdk: '>=2.2.0 <3.0.0' - + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 pedantic: ^1.7.0 - -homepage: https://dart.dev/tutorials/web/low-level-html/add-elements diff --git a/anagram/web/main.dart b/anagram/web/main.dart index f746027..bc2feec 100644 --- a/anagram/web/main.dart +++ b/anagram/web/main.dart @@ -80,12 +80,12 @@ void newletters(Event e) { } void generateNewLetters() { - Random indexGenerator = new Random(); + final indexGenerator = new Random(); wordvalue = 0; value.text = ''; buttons.clear(); for (var i = 0; i < 7; i++) { - int letterIndex = indexGenerator.nextInt(scrabbleLetters.length); + final letterIndex = indexGenerator.nextInt(scrabbleLetters.length); // Should remove the letter from scrabbleLetters to keep the // ratio correct. buttons.add(new ButtonElement()); diff --git a/analysis_options.yaml b/analysis_options.yaml index a556054..4c26a12 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -46,7 +46,6 @@ linter: - slash_for_doc_comments - sort_constructors_first - sort_unnamed_constructors_first - - super_goes_last # - type_annotate_public_apis - type_init_formals - unnecessary_brace_in_string_interps diff --git a/cmdline/analysis_options.yaml b/cmdline/analysis_options.yaml index a686c1b..b8517e8 100644 --- a/cmdline/analysis_options.yaml +++ b/cmdline/analysis_options.yaml @@ -3,12 +3,6 @@ # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml -# For lint rules and documentation, see http://dart-lang.github.io/linter/lints. -# Uncomment to specify additional rules. -# linter: -# rules: -# - camel_case_types - -analyzer: -# exclude: -# - path/to/excluded/files/** +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/cmdline/bin/dcat.dart b/cmdline/bin/dcat.dart index f07a83e..3c0110d 100644 --- a/cmdline/bin/dcat.dart +++ b/cmdline/bin/dcat.dart @@ -29,7 +29,7 @@ void main(List arguments) { ..addFlag(lineNumber, negatable: false, abbr: 'n'); argResults = parser.parse(arguments); - List paths = argResults.rest; + final paths = argResults.rest; dcat(paths, argResults[lineNumber]); } @@ -40,8 +40,8 @@ Future dcat(List paths, bool showLineNumbers) async { await stdin.pipe(stdout); } else { for (var path in paths) { - int lineNumber = 1; - Stream lines = new File(path) + var lineNumber = 1; + final lines = new File(path) .openRead() .transform(utf8.decoder) .transform(const LineSplitter()); diff --git a/cmdline/bin/dgrep.dart b/cmdline/bin/dgrep.dart index 3fbeaee..cf60a8b 100644 --- a/cmdline/bin/dgrep.dart +++ b/cmdline/bin/dgrep.dart @@ -15,18 +15,18 @@ const followLinks = 'follow-links'; ArgResults argResults; void printMatch(File file, List lines, int i) { - StringBuffer sb = new StringBuffer(); + final sb = new StringBuffer(); if (argResults[recursive]) sb.write('${file.path}:'); if (argResults[lineNumber]) sb.write('${i + 1}:'); sb.write(lines[i]); print(sb.toString()); } -Future searchFile(File file, searchTerms) async { +Future searchFile(File file, List searchTerms) async { try { var lines = await file.readAsLines(); for (var i = 0; i < lines.length; i++) { - bool found = false; + var found = false; for (var j = 0; j < searchTerms.length && !found; j++) { if (lines[i].contains(searchTerms[j])) { printMatch(file, lines, i); @@ -66,5 +66,7 @@ Future main(List arguments) async { await searchFile(new File(searchPath), searchTerms); } } + } else { + await searchFile(new File(searchPath), searchTerms); } } diff --git a/cmdline/pubspec.lock b/cmdline/pubspec.lock index 31b7252..ff6538e 100644 --- a/cmdline/pubspec.lock +++ b/cmdline/pubspec.lock @@ -7,14 +7,14 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.36.2" + version: "0.36.3" args: dependency: "direct main" description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.5.1" + version: "1.5.2" async: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -70,14 +70,14 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.2.7" + version: "1.2.8" front_end: dependency: transitive description: name: front_end url: "https://pub.dartlang.org" source: hosted - version: "0.1.17" + version: "0.1.18" glob: dependency: transitive description: @@ -105,7 +105,7 @@ packages: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.1.0" http_parser: dependency: transitive description: @@ -140,7 +140,7 @@ packages: name: kernel url: "https://pub.dartlang.org" source: hosted - version: "0.3.17" + version: "0.3.18" matcher: dependency: transitive description: @@ -161,7 +161,7 @@ packages: name: mime url: "https://pub.dartlang.org" source: hosted - version: "0.9.6+2" + version: "0.9.6+3" multi_server_socket: dependency: transitive description: @@ -301,21 +301,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.2.6" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.2.4" + version: "0.2.6" typed_data: dependency: transitive description: @@ -329,7 +329,7 @@ packages: name: vm_service_client url: "https://pub.dartlang.org" source: hosted - version: "0.2.6+1" + version: "0.2.6+2" watcher: dependency: transitive description: @@ -343,13 +343,13 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "1.0.12" + version: "1.0.13" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.1.15" + version: "2.1.16" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/cmdline/pubspec.yaml b/cmdline/pubspec.yaml index c1adaac..c6561be 100644 --- a/cmdline/pubspec.yaml +++ b/cmdline/pubspec.yaml @@ -1,8 +1,9 @@ name: cmdline description: A sample application +homepage: https://dart.dev/tutorials/server/cmdline environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dependencies: args: any @@ -15,8 +16,3 @@ dev_dependencies: executables: dcat: dgrep: - -homepage: https://dart.dev/tutorials/server/cmdline - - - diff --git a/futures/async-await-catch-error/analysis_options.yaml b/futures/async-await-catch-error/analysis_options.yaml index d520978..b8517e8 100644 --- a/futures/async-await-catch-error/analysis_options.yaml +++ b/futures/async-await-catch-error/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/futures/async-await-catch-error/pubspec.lock b/futures/async-await-catch-error/pubspec.lock index cbfd245..73c55bf 100644 --- a/futures/async-await-catch-error/pubspec.lock +++ b/futures/async-await-catch-error/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/futures/async-await-catch-error/pubspec.yaml b/futures/async-await-catch-error/pubspec.yaml index b847561..7d3d56e 100644 --- a/futures/async-await-catch-error/pubspec.yaml +++ b/futures/async-await-catch-error/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application that reads a file on dartlang using async/awai homepage: https://dart.dev/tutorials/language/futures environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 pedantic: ^1.7.0 diff --git a/futures/async-await-catch-error/web/main.dart b/futures/async-await-catch-error/web/main.dart index 95c10bf..90dfbd7 100644 --- a/futures/async-await-catch-error/web/main.dart +++ b/futures/async-await-catch-error/web/main.dart @@ -5,12 +5,12 @@ import 'dart:html'; import 'dart:async'; -DivElement output = querySelector('#output'); -PreElement pre = PreElement(); +final output = querySelector('#output'); +final pre = PreElement(); Future printDailyNewsDigest() async { try { - String news = await gatherNewsReports(); + final news = await gatherNewsReports(); pre.appendText(news); } catch (e) { pre.appendText('Something went wrong: $e'); @@ -40,7 +40,7 @@ void printBaseballScore() { // Imagine that this function is more complex and slow. :) Future gatherNewsReports() async { - String path = 'https://dart.dev/f/dailyNewsDigest.txt'; - String content = await HttpRequest.getString(path); + final path = 'https://dart.dev/f/dailyNewsDigest.txt'; + final content = await HttpRequest.getString(path); return content; } diff --git a/futures/async-await/analysis_options.yaml b/futures/async-await/analysis_options.yaml index d520978..b8517e8 100644 --- a/futures/async-await/analysis_options.yaml +++ b/futures/async-await/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/futures/async-await/pubspec.lock b/futures/async-await/pubspec.lock index cbfd245..73c55bf 100644 --- a/futures/async-await/pubspec.lock +++ b/futures/async-await/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/futures/async-await/pubspec.yaml b/futures/async-await/pubspec.yaml index e09ad82..a4eed1a 100644 --- a/futures/async-await/pubspec.yaml +++ b/futures/async-await/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application that reads a file on dartlang using async/awai homepage: https://dart.dev/tutorials/language/futures environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 pedantic: ^1.7.0 diff --git a/futures/async-await/web/main.dart b/futures/async-await/web/main.dart index c486273..cfa2910 100644 --- a/futures/async-await/web/main.dart +++ b/futures/async-await/web/main.dart @@ -5,11 +5,11 @@ import 'dart:html'; import 'dart:async'; -DivElement output = querySelector('#output'); -PreElement pre = PreElement(); +final output = querySelector('#output'); +final pre = PreElement(); Future printDailyNewsDigest() async { - String news = await gatherNewsReports(); + final news = await gatherNewsReports(); pre.appendText(news); } @@ -36,6 +36,6 @@ void printBaseballScore() { // Imagine that this function is more complex and slow. :) Future gatherNewsReports() async { - String path = 'https://dart.dev/f/dailyNewsDigest.txt'; + final path = 'https://dart.dev/f/dailyNewsDigest.txt'; return (await HttpRequest.getString(path)); } diff --git a/futures/futures-api-catch-error/analysis_options.yaml b/futures/futures-api-catch-error/analysis_options.yaml index d520978..b8517e8 100644 --- a/futures/futures-api-catch-error/analysis_options.yaml +++ b/futures/futures-api-catch-error/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/futures/futures-api-catch-error/pubspec.lock b/futures/futures-api-catch-error/pubspec.lock index cbfd245..73c55bf 100644 --- a/futures/futures-api-catch-error/pubspec.lock +++ b/futures/futures-api-catch-error/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/futures/futures-api-catch-error/pubspec.yaml b/futures/futures-api-catch-error/pubspec.yaml index 00672f4..6e7fdf4 100644 --- a/futures/futures-api-catch-error/pubspec.yaml +++ b/futures/futures-api-catch-error/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application that reads a file on dartlang using the Future homepage: https://dart.dev/tutorials/language/futures environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 diff --git a/futures/futures-api-catch-error/web/main.dart b/futures/futures-api-catch-error/web/main.dart index 961ad05..ae38b73 100644 --- a/futures/futures-api-catch-error/web/main.dart +++ b/futures/futures-api-catch-error/web/main.dart @@ -5,11 +5,11 @@ import 'dart:html'; import 'dart:async'; -DivElement output = querySelector('#output'); -PreElement pre = PreElement(); +final output = querySelector('#output'); +final pre = PreElement(); void printDailyNewsDigest() { - Future future = gatherNewsReports(); + final future = gatherNewsReports(); future.then((content) => pre.appendText(content)).catchError((e) => handleError(e)); } @@ -40,6 +40,6 @@ void printBaseballScore() { // Imagine that this function is more complex and slow. :) Future gatherNewsReports() { - String path = 'https://dart.dev/f/dailyNewsDigest.txt'; + final path = 'https://dart.dev/f/dailyNewsDigest.txt'; return HttpRequest.getString(path); } diff --git a/futures/futures-api/analysis_options.yaml b/futures/futures-api/analysis_options.yaml index d520978..b8517e8 100644 --- a/futures/futures-api/analysis_options.yaml +++ b/futures/futures-api/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/futures/futures-api/pubspec.lock b/futures/futures-api/pubspec.lock index cbfd245..73c55bf 100644 --- a/futures/futures-api/pubspec.lock +++ b/futures/futures-api/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/futures/futures-api/pubspec.yaml b/futures/futures-api/pubspec.yaml index fdcda73..f9b2d90 100644 --- a/futures/futures-api/pubspec.yaml +++ b/futures/futures-api/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application that reads a file on dartlang using the Future homepage: https://dart.dev/tutorials/language/futures environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 pedantic: ^1.7.0 diff --git a/futures/futures-api/web/main.dart b/futures/futures-api/web/main.dart index d738f6f..d6093b7 100644 --- a/futures/futures-api/web/main.dart +++ b/futures/futures-api/web/main.dart @@ -5,11 +5,11 @@ import 'dart:html'; import 'dart:async'; -DivElement output = querySelector('#output'); -PreElement pre = PreElement(); +final output = querySelector('#output'); +final pre = PreElement(); void printDailyNewsDigest() { - Future future = gatherNewsReports(); + final future = gatherNewsReports(); future.then((content) => pre.appendText(content)); } @@ -36,6 +36,6 @@ void printBaseballScore() { // Imagine that this function is more complex and slow. :) Future gatherNewsReports() { - String path = 'https://dart.dev/f/dailyNewsDigest.txt'; + final path = 'https://dart.dev/f/dailyNewsDigest.txt'; return HttpRequest.getString(path); } diff --git a/futures/sequential-processing/analysis_options.yaml b/futures/sequential-processing/analysis_options.yaml index d520978..b8517e8 100644 --- a/futures/sequential-processing/analysis_options.yaml +++ b/futures/sequential-processing/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/futures/sequential-processing/pubspec.lock b/futures/sequential-processing/pubspec.lock index cbfd245..73c55bf 100644 --- a/futures/sequential-processing/pubspec.lock +++ b/futures/sequential-processing/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/futures/sequential-processing/pubspec.yaml b/futures/sequential-processing/pubspec.yaml index fde567d..f6ffd1b 100644 --- a/futures/sequential-processing/pubspec.yaml +++ b/futures/sequential-processing/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application that performs time consuming operations sequen homepage: https://dart.dev/tutorials/language/futures environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 pedantic: ^1.7.0 diff --git a/futures/sequential-processing/web/main.dart b/futures/sequential-processing/web/main.dart index 481f590..25f143a 100644 --- a/futures/sequential-processing/web/main.dart +++ b/futures/sequential-processing/web/main.dart @@ -12,9 +12,9 @@ void main() { .then((cValue) => doSomethingWith(cValue)); } -Future expensiveA() => Future.value('from expensiveA'); -Future expensiveB() => Future.value('from expensiveB'); -Future expensiveC() => Future.value('from expensiveC'); +Future expensiveA() => Future.value('from expensiveA'); +Future expensiveB() => Future.value('from expensiveB'); +Future expensiveC() => Future.value('from expensiveC'); void doSomethingWith(value) { querySelector('#output').appendText(value); diff --git a/futures/waiting-on-futures/analysis_options.yaml b/futures/waiting-on-futures/analysis_options.yaml index d520978..b8517e8 100644 --- a/futures/waiting-on-futures/analysis_options.yaml +++ b/futures/waiting-on-futures/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/futures/waiting-on-futures/pubspec.lock b/futures/waiting-on-futures/pubspec.lock index cbfd245..73c55bf 100644 --- a/futures/waiting-on-futures/pubspec.lock +++ b/futures/waiting-on-futures/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/futures/waiting-on-futures/pubspec.yaml b/futures/waiting-on-futures/pubspec.yaml index e264f4f..350b54a 100644 --- a/futures/waiting-on-futures/pubspec.yaml +++ b/futures/waiting-on-futures/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application that triggers three functions and waits until homepage: https://dart.dev/tutorials/language/futures environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 pedantic: ^1.7.0 diff --git a/futures/waiting-on-futures/web/main.dart b/futures/waiting-on-futures/web/main.dart index c992dfe..620b0c6 100644 --- a/futures/waiting-on-futures/web/main.dart +++ b/futures/waiting-on-futures/web/main.dart @@ -5,7 +5,7 @@ import 'dart:async'; import 'dart:html'; -DivElement output = querySelector('#output'); +final output = querySelector('#output'); void main() { Future.wait([expensiveA(), expensiveB(), expensiveC()]) @@ -13,9 +13,9 @@ void main() { .catchError((e) => handleError(e)); } -Future expensiveA() => Future.value('from expensiveA'); -Future expensiveB() => Future.value('from expensiveB'); -Future expensiveC() => Future.value('from expensiveC'); +Future expensiveA() => Future.value('from expensiveA'); +Future expensiveB() => Future.value('from expensiveB'); +Future expensiveC() => Future.value('from expensiveC'); void chooseBestResponse(List responses) { output.appendText(responses[1]); diff --git a/helloworld/analysis_options.yaml b/helloworld/analysis_options.yaml index d520978..b8517e8 100644 --- a/helloworld/analysis_options.yaml +++ b/helloworld/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/helloworld/pubspec.lock b/helloworld/pubspec.lock index f6dadac..a94892e 100644 --- a/helloworld/pubspec.lock +++ b/helloworld/pubspec.lock @@ -9,4 +9,4 @@ packages: source: hosted version: "1.7.0" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/helloworld/pubspec.yaml b/helloworld/pubspec.yaml index 58a2196..70f85d5 100644 --- a/helloworld/pubspec.yaml +++ b/helloworld/pubspec.yaml @@ -3,7 +3,7 @@ description: A sample application homepage: https://dart.dev/tutorials/server/cmdline environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: pedantic: ^1.7.0 diff --git a/httpserver/analysis_options.yaml b/httpserver/analysis_options.yaml index d520978..b8517e8 100644 --- a/httpserver/analysis_options.yaml +++ b/httpserver/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/httpserver/bin/basic_file_server.dart b/httpserver/bin/basic_file_server.dart index bd4561a..8665765 100644 --- a/httpserver/bin/basic_file_server.dart +++ b/httpserver/bin/basic_file_server.dart @@ -11,10 +11,10 @@ import 'dart:async'; import 'dart:io'; import 'package:http_server/http_server.dart'; -import 'package:path/path.dart'; +import 'package:path/path.dart' as p; var targetFile = - File(join(dirname(Platform.script.toFilePath()), 'index.html')); + File(p.join(p.dirname(Platform.script.toFilePath()), 'index.html')); Future main() async { var staticFiles = VirtualDirectory('.'); diff --git a/httpserver/bin/basic_writer_client.dart b/httpserver/bin/basic_writer_client.dart index 67a594a..93854d1 100644 --- a/httpserver/bin/basic_writer_client.dart +++ b/httpserver/bin/basic_writer_client.dart @@ -22,9 +22,9 @@ Map jsonData = { }; Future main() async { - HttpClientRequest request = await HttpClient().post(_host, 4049, path) /*1*/ + final request = await HttpClient().post(_host, 4049, path) /*1*/ ..headers.contentType = ContentType.json /*2*/ ..write(jsonEncode(jsonData)); /*3*/ - HttpClientResponse response = await request.close(); /*4*/ + final response = await request.close(); /*4*/ await response.transform(utf8.decoder /*5*/).forEach(print); } diff --git a/httpserver/bin/basic_writer_server.dart b/httpserver/bin/basic_writer_server.dart index 39cd151..03cd878 100644 --- a/httpserver/bin/basic_writer_server.dart +++ b/httpserver/bin/basic_writer_server.dart @@ -16,13 +16,13 @@ Future main() async { var server = await HttpServer.bind(_host, 4049); print('Listening on http://${server.address.address}:${server.port}/'); await for (var req in server) { - ContentType contentType = req.headers.contentType; - HttpResponse response = req.response; + final contentType = req.headers.contentType; + final response = req.response; if (req.method == 'POST' && contentType?.mimeType == 'application/json' /*1*/) { try { - String content = await req.transform(utf8.decoder).join(); /*2*/ + final content = await req.transform(utf8.decoder).join(); /*2*/ var data = jsonDecode(content) as Map; /*3*/ var fileName = req.uri.pathSegments.last; /*4*/ await File(fileName).writeAsString(content, mode: FileMode.write); diff --git a/httpserver/bin/hello_world_server_secure.dart b/httpserver/bin/hello_world_server_secure.dart index 2fea45c..39909cc 100644 --- a/httpserver/bin/hello_world_server_secure.dart +++ b/httpserver/bin/hello_world_server_secure.dart @@ -12,13 +12,13 @@ import 'dart:async'; import 'dart:io'; -import 'package:path/path.dart' show dirname; +import 'package:path/path.dart' as p; String certificateChain = 'server_chain.pem'; String serverKey = 'server_key.pem'; Future main() async { - Directory.current = dirname(Platform.script.toFilePath()); + Directory.current = p.dirname(Platform.script.toFilePath()); var serverContext = SecurityContext(); /*1*/ serverContext.useCertificateChain(certificateChain); /*2*/ serverContext.usePrivateKey(serverKey, password: 'dartdart'); /*3*/ diff --git a/httpserver/bin/mini_file_server.dart b/httpserver/bin/mini_file_server.dart index f30362b..e971900 100644 --- a/httpserver/bin/mini_file_server.dart +++ b/httpserver/bin/mini_file_server.dart @@ -9,10 +9,10 @@ import 'dart:async'; import 'dart:io'; -import 'package:path/path.dart'; +import 'package:path/path.dart' as p; var targetFile = - File(join(dirname(Platform.script.toFilePath()), 'index.html')); + File(p.join(p.dirname(Platform.script.toFilePath()), 'index.html')); Future main() async { var server; diff --git a/httpserver/bin/note_server.dart b/httpserver/bin/note_server.dart index 4f2027a..ec27194 100644 --- a/httpserver/bin/note_server.dart +++ b/httpserver/bin/note_server.dart @@ -8,16 +8,16 @@ import 'dart:async'; import 'dart:io'; import 'dart:convert' show utf8, json; -import 'package:path/path.dart' show dirname; +import 'package:path/path.dart' as p; int count = 0; Future main() async { - Directory.current = dirname(Platform.script.toFilePath()); + Directory.current = p.dirname(Platform.script.toFilePath()); // One note per line. try { - List lines = File('notes.txt').readAsLinesSync(); + final lines = File('notes.txt').readAsLinesSync(); count = lines.length; } on FileSystemException { print('Could not open notes.txt.'); @@ -88,7 +88,7 @@ void saveNote(HttpRequest request, String myNote) { void getNote(HttpRequest request, String getNote) { final requestedNote = int.tryParse(getNote) ?? 0; if (requestedNote >= 0 && requestedNote < count) { - List lines = File('notes.txt').readAsLinesSync(); + final lines = File('notes.txt').readAsLinesSync(); request.response ..statusCode = HttpStatus.ok ..writeln(lines[requestedNote]) diff --git a/httpserver/bin/number_guesser.dart b/httpserver/bin/number_guesser.dart index 9b136f2..6aaf5df 100644 --- a/httpserver/bin/number_guesser.dart +++ b/httpserver/bin/number_guesser.dart @@ -29,11 +29,11 @@ Future guess() { } Future checkGuess(int guess) async { - bool isGoodGuess = false; - HttpClientRequest request = + var isGoodGuess = false; + final request = await client.get(InternetAddress.loopbackIPv4.host, 4041, '/?q=$guess'); print('Guess is $guess.'); - HttpClientResponse response = await request.close(); + final response = await request.close(); if (response.statusCode == HttpStatus.ok) { var contents = await response.transform(utf8.decoder).join(); if (contents.startsWith('true')) { diff --git a/httpserver/bin/number_thinker.dart b/httpserver/bin/number_thinker.dart index 194dffb..52dd54b 100644 --- a/httpserver/bin/number_thinker.dart +++ b/httpserver/bin/number_thinker.dart @@ -17,7 +17,7 @@ int myNumber = intGenerator.nextInt(10); Future main() async { print("I'm thinking of a number: $myNumber"); - HttpServer server = await HttpServer.bind( + final server = await HttpServer.bind( InternetAddress.loopbackIPv4, 4041, ); diff --git a/httpserver/bin/static_file_server.dart b/httpserver/bin/static_file_server.dart index bcffaab..eabd84c 100644 --- a/httpserver/bin/static_file_server.dart +++ b/httpserver/bin/static_file_server.dart @@ -8,10 +8,10 @@ import 'dart:async'; import 'dart:io'; import 'package:http_server/http_server.dart'; -import 'package:path/path.dart'; +import 'package:path/path.dart' as p; Future main() async { - var pathToBuild = join(dirname(Platform.script.toFilePath())); + var pathToBuild = p.join(p.dirname(Platform.script.toFilePath())); var staticFiles = VirtualDirectory(pathToBuild); staticFiles.allowDirectoryListing = true; /*1*/ diff --git a/httpserver/pubspec.lock b/httpserver/pubspec.lock index ca689da..f45423b 100644 --- a/httpserver/pubspec.lock +++ b/httpserver/pubspec.lock @@ -42,7 +42,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" build: dependency: transitive description: @@ -63,14 +63,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -98,7 +98,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -506,4 +506,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/httpserver/pubspec.yaml b/httpserver/pubspec.yaml index 57ad68b..5e38081 100644 --- a/httpserver/pubspec.yaml +++ b/httpserver/pubspec.yaml @@ -3,7 +3,7 @@ description: Sample HTTP clients and servers homepage: https://dart.dev/tutorials/server/httpserver environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dependencies: http_server: ^0.9.8+1 @@ -12,5 +12,5 @@ dependencies: dev_dependencies: test: ^1.6.3 pedantic: ^1.7.0 - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 diff --git a/httpserver/test/httpserver_test.dart b/httpserver/test/httpserver_test.dart index 54dfe14..a469e24 100644 --- a/httpserver/test/httpserver_test.dart +++ b/httpserver/test/httpserver_test.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; import 'package:test/test.dart'; -import 'package:path/path.dart'; import '../bin/basic_file_server.dart' as basic_file_server; import '../bin/basic_writer_client.dart' as basic_writer_client; import '../bin/basic_writer_server.dart' as basic_writer_server; @@ -86,7 +85,7 @@ void main() { // Only resolve the server once for all tests in this group to avoid // "binding multiple times on the same (address, port) combination". - Future server = basic_writer_server.main(); + final server = basic_writer_server.main(); void deleteTmpFile() { if (file.existsSync()) file.delete(); diff --git a/httpserver/web/note_client.dart b/httpserver/web/note_client.dart index 52e420a..4847eff 100644 --- a/httpserver/web/note_client.dart +++ b/httpserver/web/note_client.dart @@ -38,7 +38,7 @@ void saveNote(Event e) { void requestNote(Event e) { if (chooseNote.value.isEmpty) return; - int getNoteNumber = int.tryParse(chooseNote.value) ?? 0; + final getNoteNumber = int.tryParse(chooseNote.value) ?? 0; request = HttpRequest(); request.onReadyStateChange.listen(onData); diff --git a/its_all_about_you/analysis_options.yaml b/its_all_about_you/analysis_options.yaml index d520978..b8517e8 100644 --- a/its_all_about_you/analysis_options.yaml +++ b/its_all_about_you/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/its_all_about_you/pubspec.lock b/its_all_about_you/pubspec.lock index cbfd245..73c55bf 100644 --- a/its_all_about_you/pubspec.lock +++ b/its_all_about_you/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/its_all_about_you/pubspec.yaml b/its_all_about_you/pubspec.yaml index 4e03efd..d43b3e7 100644 --- a/its_all_about_you/pubspec.yaml +++ b/its_all_about_you/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application homepage: https://dart.dev/tutorials/web/fetch-data environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 diff --git a/its_all_about_you/web/main.dart b/its_all_about_you/web/main.dart index fe8f385..9647db2 100644 --- a/its_all_about_you/web/main.dart +++ b/its_all_about_you/web/main.dart @@ -60,7 +60,7 @@ void main() { // Pre-fill the form with some default values. void _populateFromJson() { - String jsonDataAsString = ''' + final jsonDataAsString = ''' { "favoriteNumber":73, "valueOfPi":3.141592, "chocolate":true, @@ -90,13 +90,13 @@ void _populateFromJson() { // Display all values as JSON. void showJson(Event e) { // Grab the data that will be converted to JSON. - num favNum = int.parse(favoriteNumber.value); - num pi = double.parse(valueOfPi.value); - bool chocolate = loveChocolate.checked; - String sign = horoscope.value; - List favoriteThings = [favOne.value, favTwo.value, favThree.value]; + final favNum = int.parse(favoriteNumber.value); + final pi = double.parse(valueOfPi.value); + final chocolate = loveChocolate.checked; + final sign = horoscope.value; + final favoriteThings = [favOne.value, favTwo.value, favThree.value]; - Map formData = { + final formData = { 'favoriteNumber': favNum, 'valueOfPi': pi, 'chocolate': chocolate, diff --git a/mini/analysis_options.yaml b/mini/analysis_options.yaml index d520978..b8517e8 100644 --- a/mini/analysis_options.yaml +++ b/mini/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/mini/pubspec.lock b/mini/pubspec.lock index cbfd245..73c55bf 100644 --- a/mini/pubspec.lock +++ b/mini/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/mini/pubspec.yaml b/mini/pubspec.yaml index 58b2f18..2746d1b 100644 --- a/mini/pubspec.yaml +++ b/mini/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application homepage: https://dart.dev/tutorials/web/low-level-html/connect-dart-html environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 pedantic: ^1.7.0 diff --git a/mini_with_style/analysis_options.yaml b/mini_with_style/analysis_options.yaml index d520978..b8517e8 100644 --- a/mini_with_style/analysis_options.yaml +++ b/mini_with_style/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/mini_with_style/pubspec.lock b/mini_with_style/pubspec.lock index cbfd245..73c55bf 100644 --- a/mini_with_style/pubspec.lock +++ b/mini_with_style/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/mini_with_style/pubspec.yaml b/mini_with_style/pubspec.yaml index af14dde..bd69782 100644 --- a/mini_with_style/pubspec.yaml +++ b/mini_with_style/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application homepage: https://dart.dev/tutorials/web/low-level-html/connect-dart-html environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 diff --git a/portmanteaux/analysis_options.yaml b/portmanteaux/analysis_options.yaml index 454cc8f..b8517e8 100644 --- a/portmanteaux/analysis_options.yaml +++ b/portmanteaux/analysis_options.yaml @@ -3,7 +3,6 @@ # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml -analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/portmanteaux/pubspec.lock b/portmanteaux/pubspec.lock index cbfd245..73c55bf 100644 --- a/portmanteaux/pubspec.lock +++ b/portmanteaux/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/portmanteaux/pubspec.yaml b/portmanteaux/pubspec.yaml index dbd84c9..13025f5 100644 --- a/portmanteaux/pubspec.yaml +++ b/portmanteaux/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application homepage: https://dart.dev/tutorials/web/fetch-data environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 diff --git a/portmanteaux/web/main.dart b/portmanteaux/web/main.dart index edb0c8f..3c40ce8 100644 --- a/portmanteaux/web/main.dart +++ b/portmanteaux/web/main.dart @@ -25,9 +25,9 @@ void makeRequest(Event e) { void requestComplete(HttpRequest request) { if (request.status == 200) { - List portmanteaux = + final portmanteaux = (json.decode(request.responseText) as List).cast(); - for (int i = 0; i < portmanteaux.length; i++) { + for (var i = 0; i < portmanteaux.length; i++) { wordList.children.add(new LIElement()..text = portmanteaux[i]); } } else { diff --git a/portmanteaux_simple/analysis_options.yaml b/portmanteaux_simple/analysis_options.yaml index 454cc8f..b8517e8 100644 --- a/portmanteaux_simple/analysis_options.yaml +++ b/portmanteaux_simple/analysis_options.yaml @@ -3,7 +3,6 @@ # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml -analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/portmanteaux_simple/pubspec.lock b/portmanteaux_simple/pubspec.lock index cbfd245..73c55bf 100644 --- a/portmanteaux_simple/pubspec.lock +++ b/portmanteaux_simple/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/portmanteaux_simple/pubspec.yaml b/portmanteaux_simple/pubspec.yaml index 9d3b20a..7000e6e 100644 --- a/portmanteaux_simple/pubspec.yaml +++ b/portmanteaux_simple/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application homepage: https://dart.dev/tutorials/web/fetch-data environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 diff --git a/portmanteaux_simple/web/main.dart b/portmanteaux_simple/web/main.dart index 75a348f..6dad4d2 100644 --- a/portmanteaux_simple/web/main.dart +++ b/portmanteaux_simple/web/main.dart @@ -26,8 +26,8 @@ Future makeRequest(Event e) async { } void processString(String jsonString) { - List portmanteaux = (json.decode(jsonString) as List).cast(); - for (int i = 0; i < portmanteaux.length; i++) { + final portmanteaux = (json.decode(jsonString) as List).cast(); + for (var i = 0; i < portmanteaux.length; i++) { wordList.children.add(new LIElement()..text = portmanteaux[i]); } } diff --git a/search_form/analysis_options.yaml b/search_form/analysis_options.yaml index d520978..b8517e8 100644 --- a/search_form/analysis_options.yaml +++ b/search_form/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/search_form/pubspec.lock b/search_form/pubspec.lock index cbfd245..73c55bf 100644 --- a/search_form/pubspec.lock +++ b/search_form/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/search_form/pubspec.yaml b/search_form/pubspec.yaml index 935e5b2..a03851a 100644 --- a/search_form/pubspec.yaml +++ b/search_form/pubspec.yaml @@ -2,9 +2,9 @@ name: search_form description: A sample application environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 diff --git a/streams/last_positive/analysis_options.yaml b/streams/last_positive/analysis_options.yaml index d520978..b8517e8 100644 --- a/streams/last_positive/analysis_options.yaml +++ b/streams/last_positive/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/streams/last_positive/pubspec.lock b/streams/last_positive/pubspec.lock index 3f86b3b..ccede2f 100644 --- a/streams/last_positive/pubspec.lock +++ b/streams/last_positive/pubspec.lock @@ -28,7 +28,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -345,4 +345,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/streams/last_positive/pubspec.yaml b/streams/last_positive/pubspec.yaml index ae09a41..602888e 100644 --- a/streams/last_positive/pubspec.yaml +++ b/streams/last_positive/pubspec.yaml @@ -3,8 +3,8 @@ description: A simple app that reads from an integer stream and reports the last homepage: https://dart.dev/tutorials/language/streams environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - pedantic: ^1.0.0 - test: ^1.0.0 + pedantic: ^1.7.0 + test: ^1.6.0 diff --git a/streams/read_file/analysis_options.yaml b/streams/read_file/analysis_options.yaml index d520978..b8517e8 100644 --- a/streams/read_file/analysis_options.yaml +++ b/streams/read_file/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/streams/read_file/pubspec.lock b/streams/read_file/pubspec.lock index 3f86b3b..ccede2f 100644 --- a/streams/read_file/pubspec.lock +++ b/streams/read_file/pubspec.lock @@ -28,7 +28,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -345,4 +345,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/streams/read_file/pubspec.yaml b/streams/read_file/pubspec.yaml index f91ac4c..5044170 100644 --- a/streams/read_file/pubspec.yaml +++ b/streams/read_file/pubspec.yaml @@ -3,8 +3,8 @@ description: A simple app that reads a file (specified on the command line), dec homepage: https://dart.dev/tutorials/language/streams environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - pedantic: ^1.0.0 - test: ^1.0.0 + pedantic: ^1.7.0 + test: ^1.6.0 diff --git a/streams/simple_stream/analysis_options.yaml b/streams/simple_stream/analysis_options.yaml index d520978..b8517e8 100644 --- a/streams/simple_stream/analysis_options.yaml +++ b/streams/simple_stream/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/streams/simple_stream/bin/main.dart b/streams/simple_stream/bin/main.dart index d3315f4..3bdd82c 100644 --- a/streams/simple_stream/bin/main.dart +++ b/streams/simple_stream/bin/main.dart @@ -14,7 +14,7 @@ Future sumStream(Stream stream) async { } Stream countStream(int to) async* { - for (int i = 1; i <= to; i++) { + for (var i = 1; i <= to; i++) { yield i; } } diff --git a/streams/simple_stream/pubspec.lock b/streams/simple_stream/pubspec.lock index 3f86b3b..ccede2f 100644 --- a/streams/simple_stream/pubspec.lock +++ b/streams/simple_stream/pubspec.lock @@ -28,7 +28,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -345,4 +345,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/streams/simple_stream/pubspec.yaml b/streams/simple_stream/pubspec.yaml index 4790d56..d78e5a1 100644 --- a/streams/simple_stream/pubspec.yaml +++ b/streams/simple_stream/pubspec.yaml @@ -3,8 +3,8 @@ description: A simple application that reads integers from a stream and adds the homepage: https://dart.dev/tutorials/language/streams environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - pedantic: ^1.0.0 - test: ^1.0.0 + pedantic: ^1.7.0 + test: ^1.6.0 diff --git a/streams/throw_error/analysis_options.yaml b/streams/throw_error/analysis_options.yaml index d520978..b8517e8 100644 --- a/streams/throw_error/analysis_options.yaml +++ b/streams/throw_error/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/streams/throw_error/bin/main.dart b/streams/throw_error/bin/main.dart index 3cf9e2a..35b706d 100644 --- a/streams/throw_error/bin/main.dart +++ b/streams/throw_error/bin/main.dart @@ -18,7 +18,7 @@ Future sumStream(Stream stream) async { } Stream countStream(int to) async* { - for (int i = 1; i <= to; i++) { + for (var i = 1; i <= to; i++) { if (i == 4) { // ignore: only_throw_errors throw "Whoops!"; // Intentional error diff --git a/streams/throw_error/pubspec.lock b/streams/throw_error/pubspec.lock index 3f86b3b..ccede2f 100644 --- a/streams/throw_error/pubspec.lock +++ b/streams/throw_error/pubspec.lock @@ -28,7 +28,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -345,4 +345,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/streams/throw_error/pubspec.yaml b/streams/throw_error/pubspec.yaml index ed97ccd..7fa38c4 100644 --- a/streams/throw_error/pubspec.yaml +++ b/streams/throw_error/pubspec.yaml @@ -3,8 +3,8 @@ description: A simple app that reads from a stream and throws an error when the homepage: https://dart.dev/tutorials/language/streams environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - pedantic: ^1.0.0 - test: ^1.0.0 + pedantic: ^1.7.0 + test: ^1.6.0 diff --git a/todo/analysis_options.yaml b/todo/analysis_options.yaml index d520978..b8517e8 100644 --- a/todo/analysis_options.yaml +++ b/todo/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/todo/pubspec.lock b/todo/pubspec.lock index cbfd245..73c55bf 100644 --- a/todo/pubspec.lock +++ b/todo/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/todo/pubspec.yaml b/todo/pubspec.yaml index a6b38ce..fee1333 100644 --- a/todo/pubspec.yaml +++ b/todo/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application homepage: https://dart.dev/tutorials/web/low-level-html/add-elements environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 diff --git a/todo_with_delete/analysis_options.yaml b/todo_with_delete/analysis_options.yaml index d520978..b8517e8 100644 --- a/todo_with_delete/analysis_options.yaml +++ b/todo_with_delete/analysis_options.yaml @@ -2,3 +2,7 @@ # projects at Google. For details and rationale, # see https://github.com/dart-lang/pedantic#enabled-lints. include: package:pedantic/analysis_options.yaml + +linter: + rules: + - omit_local_variable_types \ No newline at end of file diff --git a/todo_with_delete/pubspec.lock b/todo_with_delete/pubspec.lock index cbfd245..73c55bf 100644 --- a/todo_with_delete/pubspec.lock +++ b/todo_with_delete/pubspec.lock @@ -56,14 +56,14 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_modules: dependency: transitive description: name: build_modules url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.3.0" build_resolvers: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "2.1.1" built_collection: dependency: transitive description: @@ -422,4 +422,4 @@ packages: source: hosted version: "2.1.16" sdks: - dart: ">=2.3.0-dev.0.1 <3.0.0" + dart: ">=2.3.0 <3.0.0" diff --git a/todo_with_delete/pubspec.yaml b/todo_with_delete/pubspec.yaml index 1c608a5..fee8396 100644 --- a/todo_with_delete/pubspec.yaml +++ b/todo_with_delete/pubspec.yaml @@ -3,9 +3,9 @@ description: A sample application homepage: https://dart.dev/tutorials/web/low-level-html/remove-elements environment: - sdk: '>=2.2.0 <3.0.0' + sdk: '>=2.3.0 <3.0.0' dev_dependencies: - build_runner: ^1.1.2 - build_web_compilers: ^1.0.0 - pedantic: ^1.0.0 + build_runner: ^1.5.0 + build_web_compilers: ^2.1.0 + pedantic: ^1.7.0 From 5031377e8a5b0d595794d056d57b3103ebe73efb Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Fri, 21 Jun 2019 09:22:11 +1000 Subject: [PATCH 25/26] Add trailing new line --- anagram/analysis_options.yaml | 2 +- cmdline/analysis_options.yaml | 2 +- futures/async-await-catch-error/analysis_options.yaml | 2 +- futures/async-await/analysis_options.yaml | 2 +- futures/futures-api-catch-error/analysis_options.yaml | 2 +- futures/futures-api/analysis_options.yaml | 2 +- futures/sequential-processing/analysis_options.yaml | 2 +- futures/waiting-on-futures/analysis_options.yaml | 2 +- helloworld/analysis_options.yaml | 2 +- httpserver/analysis_options.yaml | 2 +- its_all_about_you/analysis_options.yaml | 2 +- mini/analysis_options.yaml | 2 +- mini_with_style/analysis_options.yaml | 2 +- portmanteaux/analysis_options.yaml | 2 +- portmanteaux_simple/analysis_options.yaml | 2 +- search_form/analysis_options.yaml | 2 +- streams/last_positive/analysis_options.yaml | 2 +- streams/read_file/analysis_options.yaml | 2 +- streams/simple_stream/analysis_options.yaml | 2 +- streams/throw_error/analysis_options.yaml | 2 +- todo/analysis_options.yaml | 2 +- todo_with_delete/analysis_options.yaml | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/anagram/analysis_options.yaml b/anagram/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/anagram/analysis_options.yaml +++ b/anagram/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/cmdline/analysis_options.yaml b/cmdline/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/cmdline/analysis_options.yaml +++ b/cmdline/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/futures/async-await-catch-error/analysis_options.yaml b/futures/async-await-catch-error/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/futures/async-await-catch-error/analysis_options.yaml +++ b/futures/async-await-catch-error/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/futures/async-await/analysis_options.yaml b/futures/async-await/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/futures/async-await/analysis_options.yaml +++ b/futures/async-await/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/futures/futures-api-catch-error/analysis_options.yaml b/futures/futures-api-catch-error/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/futures/futures-api-catch-error/analysis_options.yaml +++ b/futures/futures-api-catch-error/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/futures/futures-api/analysis_options.yaml b/futures/futures-api/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/futures/futures-api/analysis_options.yaml +++ b/futures/futures-api/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/futures/sequential-processing/analysis_options.yaml b/futures/sequential-processing/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/futures/sequential-processing/analysis_options.yaml +++ b/futures/sequential-processing/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/futures/waiting-on-futures/analysis_options.yaml b/futures/waiting-on-futures/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/futures/waiting-on-futures/analysis_options.yaml +++ b/futures/waiting-on-futures/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/helloworld/analysis_options.yaml b/helloworld/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/helloworld/analysis_options.yaml +++ b/helloworld/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/httpserver/analysis_options.yaml b/httpserver/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/httpserver/analysis_options.yaml +++ b/httpserver/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/its_all_about_you/analysis_options.yaml b/its_all_about_you/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/its_all_about_you/analysis_options.yaml +++ b/its_all_about_you/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/mini/analysis_options.yaml b/mini/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/mini/analysis_options.yaml +++ b/mini/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/mini_with_style/analysis_options.yaml b/mini_with_style/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/mini_with_style/analysis_options.yaml +++ b/mini_with_style/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/portmanteaux/analysis_options.yaml b/portmanteaux/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/portmanteaux/analysis_options.yaml +++ b/portmanteaux/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/portmanteaux_simple/analysis_options.yaml b/portmanteaux_simple/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/portmanteaux_simple/analysis_options.yaml +++ b/portmanteaux_simple/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/search_form/analysis_options.yaml b/search_form/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/search_form/analysis_options.yaml +++ b/search_form/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/streams/last_positive/analysis_options.yaml b/streams/last_positive/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/streams/last_positive/analysis_options.yaml +++ b/streams/last_positive/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/streams/read_file/analysis_options.yaml b/streams/read_file/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/streams/read_file/analysis_options.yaml +++ b/streams/read_file/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/streams/simple_stream/analysis_options.yaml b/streams/simple_stream/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/streams/simple_stream/analysis_options.yaml +++ b/streams/simple_stream/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/streams/throw_error/analysis_options.yaml b/streams/throw_error/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/streams/throw_error/analysis_options.yaml +++ b/streams/throw_error/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/todo/analysis_options.yaml b/todo/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/todo/analysis_options.yaml +++ b/todo/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types diff --git a/todo_with_delete/analysis_options.yaml b/todo_with_delete/analysis_options.yaml index b8517e8..c5ea622 100644 --- a/todo_with_delete/analysis_options.yaml +++ b/todo_with_delete/analysis_options.yaml @@ -5,4 +5,4 @@ include: package:pedantic/analysis_options.yaml linter: rules: - - omit_local_variable_types \ No newline at end of file + - omit_local_variable_types From d51ec4aab0765cc7af4b9419ab6bbf20778d1e49 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Fri, 21 Jun 2019 09:25:10 +1000 Subject: [PATCH 26/26] remove debugging cruft --- futures/futures-api-catch-error/web/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/futures/futures-api-catch-error/web/main.dart b/futures/futures-api-catch-error/web/main.dart index ae38b73..2f67fa5 100644 --- a/futures/futures-api-catch-error/web/main.dart +++ b/futures/futures-api-catch-error/web/main.dart @@ -35,7 +35,7 @@ void printWeatherForecast() { } void printBaseballScore() { - pre.appendText('Baseball score: Red Sox 10, Yankees 30\n'); + pre.appendText('Baseball score: Red Sox 10, Yankees 0\n'); } // Imagine that this function is more complex and slow. :)