development:
-
First, make sure Dart2 and Aqueduct are installed on your machine
-
Next, navigate to th file at
./flutter_by_example_monorepo/clients/web/lib/src/app/repositories/posts_respository_filesystem.dart
. Here, you'll need to comment out theBASE_URL
variable that points to heroku and uncomment the variable that points to localhost. YES, it is janky SO WHAT -
Finally, run the commands below
cd common
pub get
cd ../cms_server
pub get
dart --observe bin/dev.dart
cd ../clients/web
pub get
webdev serve
Server is running at localhost:3000 Site is running at localhost:8080
NB: be sure to revert the BASE_URL
variable to the heroku URL before committing to master!!!
If you want to add a new tutorial to the app, you need to do two things:
-
Create the markdown file and fill it with content.
- The file must be in the
cms_server/public/content
directory. Within that directory, the location in the filesystem is inconsequential and just for us humans. - It must have valid frontmatter. I suggest copy and pasting the frontmatter from another file. Or from here:
--- title: "Built-in Animation: Hero transition" author: "Eric" category: "Flutter UI Example Apps" subSection: "Basic App" tags: - AnimatedCrossFade - Hero ---
- The file must be in the
-
Add it the file to the table of contents.
- The table of contents lives at
common/lib/src/table_of_contents.dart
(or at the link below) - The names / categories / subcategories titles must match the front matter exactly. I'm still pondering the contents structure, so feel free to take liberties with creating new categories, etc.
- The table of contents lives at
- If you're writing an article, please keep the following sudo-style-guide bullets in mind:
- Every tutorial page on the site should be useful on its own. Especially the lessons that are one off examples and not tied to a larger, complete app.
- Conversational, natural voice! I don't care if you use the word 'fuck' on Flutter by Example, as long as it's authentic. Writing like a human talks, which is unlike a robot talks, is super important.
- Using DartPad's 'test' feature is encouraged.
- The link below is to a cool guide all about using DartPad in tutorials.
- Dartpad