diff --git a/web/form_app b/web/form_app new file mode 120000 index 000000000..6ddab16cd --- /dev/null +++ b/web/form_app @@ -0,0 +1 @@ +../experimental/form_app \ No newline at end of file diff --git a/web/peanut.yaml b/web/peanut.yaml index 158d43d61..64eba30a6 100644 --- a/web/peanut.yaml +++ b/web/peanut.yaml @@ -10,5 +10,7 @@ directories: - slide_puzzle/web - timeflow/web - vision_challenge/web +- form_app/web +- web_dashboard/web post-build-dart-script: _tool/peanut_post_build.dart diff --git a/web/readme.md b/web/readme.md index eff0bb2de..b0ed11577 100644 --- a/web/readme.md +++ b/web/readme.md @@ -45,7 +45,7 @@ $ flutter pub global activate peanut Verify `pub get` has been run on each demo: ```console -$ dart _tool/verify_packages +$ dart _tool/verify_packages.dart ``` Build all demos, along with the sample index: diff --git a/web/samples_index/lib/samples_index.dart b/web/samples_index/lib/samples_index.dart index 87e30d6ad..3910df941 100644 --- a/web/samples_index/lib/samples_index.dart +++ b/web/samples_index/lib/samples_index.dart @@ -3,8 +3,7 @@ // found in the LICENSE file import 'dart:convert'; - -import 'package:resource/resource.dart'; +import 'dart:io'; import 'src/data.dart'; import 'package:checked_yaml/checked_yaml.dart'; @@ -12,8 +11,8 @@ import 'package:checked_yaml/checked_yaml.dart'; export 'src/data.dart'; Future> getSamples() async { - var yamlFile = Resource('package:samples_index/src/samples.yaml'); - var cookbookFile = Resource('package:samples_index/src/cookbook.json'); + var yamlFile = File('lib/src/samples.yaml'); + var cookbookFile = File('lib/src/cookbook.json'); var contents = await yamlFile.readAsString(); var cookbookContents = await cookbookFile.readAsString(); var index = checkedYamlDecode(contents, (m) => Index.fromJson(m), diff --git a/web/samples_index/lib/src/samples.yaml b/web/samples_index/lib/src/samples.yaml index 2c5a23190..650c9f89e 100644 --- a/web/samples_index/lib/src/samples.yaml +++ b/web/samples_index/lib/src/samples.yaml @@ -313,6 +313,52 @@ samples: type: sample web: web/provider_shopper + - name: Web Dashboard + author: Flutter + screenshots: + - url: images/web_dashboard1.png + alt: Web Dashboard screenshot + - url: images/web_dashboard2.png + alt: Web Dashbaord screenshot + - url: images/web_dashboard3.png + alt: Web Dashboard screenshot + source: https://github.com/flutter/samples/tree/master/experimental/web_dashboard + description: > + A dashboard app that displays daily entries. Demonstrates AdaptiveScaffold and NavigationRail. Showcases how to + use Firebase, but uses a mock backend by default. + difficulty: advanced + widgets: + - AdaptiveScaffold + - NavigationRail + - FutureBuilder + - StreamBuilder + packages: + - firebase + tags: ['intermediate', 'sample', 'firebase'] + platforms: ['ios', 'android', 'web'] + type: sample + web: web/web_dashboard + + - name: Form App + author: Flutter + screenshots: + - url: images/form_app1.png + alt: Form App screenshot + - url: images/form_app2.png + alt: Form App screenshot + - url: images/form_app3.png + alt: Form App screenshot + source: https://github.com/flutter/samples/tree/master/experimental/form_app + description: > + A Flutter sample app that shows how to use Forms. + difficulty: intermediate + widgets: + - Form + packages: [] + tags: ['intermediate', 'sample', 'forms'] + platforms: ['ios', 'android', 'web'] + type: sample + web: web/form_app ################### #### Web Demos #### ################### diff --git a/web/samples_index/pubspec.yaml b/web/samples_index/pubspec.yaml index ac3a1f872..e771a5cd8 100644 --- a/web/samples_index/pubspec.yaml +++ b/web/samples_index/pubspec.yaml @@ -8,7 +8,6 @@ environment: dependencies: json_annotation: ^3.0.0 path: ^1.6.0 - resource: ^2.1.6 yaml: ^2.2.0 mdc_web: ^0.5.0-pre sass_builder: ^2.1.0 diff --git a/web/samples_index/web/images/form_app1.png b/web/samples_index/web/images/form_app1.png new file mode 100644 index 000000000..96b0ec645 Binary files /dev/null and b/web/samples_index/web/images/form_app1.png differ diff --git a/web/samples_index/web/images/form_app2.png b/web/samples_index/web/images/form_app2.png new file mode 100644 index 000000000..b8dadde46 Binary files /dev/null and b/web/samples_index/web/images/form_app2.png differ diff --git a/web/samples_index/web/images/form_app3.png b/web/samples_index/web/images/form_app3.png new file mode 100644 index 000000000..8f6be8403 Binary files /dev/null and b/web/samples_index/web/images/form_app3.png differ diff --git a/web/samples_index/web/images/web_dashboard1.png b/web/samples_index/web/images/web_dashboard1.png new file mode 100644 index 000000000..be8fff2f2 Binary files /dev/null and b/web/samples_index/web/images/web_dashboard1.png differ diff --git a/web/samples_index/web/images/web_dashboard2.png b/web/samples_index/web/images/web_dashboard2.png new file mode 100644 index 000000000..6119e00d4 Binary files /dev/null and b/web/samples_index/web/images/web_dashboard2.png differ diff --git a/web/samples_index/web/images/web_dashboard3.png b/web/samples_index/web/images/web_dashboard3.png new file mode 100644 index 000000000..59423b424 Binary files /dev/null and b/web/samples_index/web/images/web_dashboard3.png differ diff --git a/web/web_dashboard b/web/web_dashboard new file mode 120000 index 000000000..b253e1d7f --- /dev/null +++ b/web/web_dashboard @@ -0,0 +1 @@ +../experimental/web_dashboard \ No newline at end of file