Skip to content

Commit 1ae79d2

Browse files
committed
docs: initialize demo dogs_flutter project for docs with basic structure and components
1 parent bf2ce4a commit 1ae79d2

File tree

27 files changed

+1279
-15
lines changed

27 files changed

+1279
-15
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
(
4+
cd "packages/dogs_flutter/demo"
5+
flutter pub get
6+
flutter pub run build_runner build --delete-conflicting-outputs
7+
flutter build web --release --base-href /assets/dogs_flutter/demo/
8+
)
9+
10+
rm -rf docs/assets/dogs_flutter/demo
11+
mv -f packages/dogs_flutter/demo/build/web/ docs/assets/dogs_flutter/demo/

benchmarks/pubspec.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ packages:
101101
dependency: transitive
102102
description:
103103
name: build_modules
104-
sha256: "349f492c6cf66d32d24b71368908df23426440bf9ee4642fdb79978adb82a877"
104+
sha256: b1fc29a603669b25a5d95cc9610ed649e9f00e6075e5b6b721aa1a095cff13de
105105
url: "https://pub.dev"
106106
source: hosted
107-
version: "5.0.12"
107+
version: "5.0.13"
108108
build_resolvers:
109109
dependency: transitive
110110
description:
@@ -133,10 +133,10 @@ packages:
133133
dependency: "direct dev"
134134
description:
135135
name: build_web_compilers
136-
sha256: "062de601d0e64e7f7fcdae00661081a489813039240e843ef238abb75e09ac2f"
136+
sha256: f9b8e84dbfa7688221c2376e6f68ffd796597785a0a5b1e8cd2516a92fdc0a3c
137137
url: "https://pub.dev"
138138
source: hosted
139-
version: "4.1.2"
139+
version: "4.1.5"
140140
built_collection:
141141
dependency: "direct main"
142142
description:
@@ -845,4 +845,4 @@ packages:
845845
source: hosted
846846
version: "3.1.3"
847847
sdks:
848-
dart: ">=3.7.0 <3.8.0-z"
848+
dart: ">=3.7.0 <3.9.0-z"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
demo/

docs/flutter/binding.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,17 @@ by manually setting it using the `binder` property of the `FieldBinding` widget
2525

2626
A field binding widget automatically creates a `Widget` from the field definition and binds it to the `FieldBindingController`
2727
contained in the `StructureBindingController`. If the customizability of the field is not enough, you can always
28-
create a custom binder or just consume the state of the `FieldBindingController` directly in your widget tree.
28+
create a custom binder or just consume the state of the `FieldBindingController` directly in your widget tree.
29+
30+
31+
## Examples
32+
33+
<iframe src="/assets/dogs_flutter/demo/index.html#/binder/string" width="100%" height="150"></iframe>
34+
35+
<iframe src="/assets/dogs_flutter/demo/index.html#/binder/int" width="100%" height="150"></iframe>
36+
37+
<iframe src="/assets/dogs_flutter/demo/index.html#/binder/double" width="100%" height="150"></iframe>
38+
39+
<iframe src="/assets/dogs_flutter/demo/index.html#/binder/bool" width="100%" height="150"></iframe>
40+
41+
<iframe src="/assets/dogs_flutter/demo/index.html#/binder/enum" width="100%" height="200"></iframe>

docs/stylesheets/theme-tweaks.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,12 @@ details a:not(.md-button), div.admonition a:not(.md-button) {
199199

200200
.md-footer {
201201
background-color: var(--md-footer-bg-color--dark) !important;
202+
}
203+
204+
iframe {
205+
border-radius: var(--md-border-radius) !important;
206+
border: 1px solid #25272d !important;
207+
overflow: hidden !important;
208+
padding: 0;
209+
background-color: black;
202210
}

melos.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ scripts:
3636
packageFilters:
3737
fileExists:
3838
- page-deploy.sh
39+
preview-docs:
40+
description: 'Runs the preview docs script'
41+
run: "bash .github/workflows/scripts/prepare-demo-build.sh && mkdocs serve"
3942
test:
4043
description: Runs all tests in the project.
4144
run: melos test-dart && melos test-flutter
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.build/
9+
.buildlog/
10+
.history
11+
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# The .vscode folder contains launch configuration and tasks you configure in
22+
# VS Code which you may wish to be included in version control, so this line
23+
# is commented out by default.
24+
#.vscode/
25+
26+
# Flutter/Dart/Pub related
27+
**/doc/api/
28+
**/ios/Flutter/.last_build_id
29+
.dart_tool/
30+
.flutter-plugins
31+
.flutter-plugins-dependencies
32+
.pub-cache/
33+
.pub/
34+
/build/
35+
36+
# Symbolication related
37+
app.*.symbols
38+
39+
# Obfuscation related
40+
app.*.map.json
41+
42+
# Android Studio will place build artifacts here
43+
/android/app/debug
44+
/android/app/profile
45+
/android/app/release
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
17+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
18+
- platform: android
19+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
20+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
21+
- platform: ios
22+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
23+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
24+
- platform: linux
25+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
26+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
27+
- platform: macos
28+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
29+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
30+
- platform: web
31+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
32+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
33+
- platform: windows
34+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
35+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# demo
2+
3+
This module contains a demo of the dogs_flutter package for use in our docs.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

0 commit comments

Comments
 (0)