ericwindmill / flutter_by_example

A mono repo for the new flutter by example web app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flutter (and Dart) by Example mono repo.

development:

  1. First, make sure Dart2 and Aqueduct are installed on your machine

    Dart 2

    Aqueduct

  2. 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 the BASE_URL variable that points to heroku and uncomment the variable that points to localhost. YES, it is janky SO WHAT

  3. 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!!!

Adding content

If you want to add a new tutorial to the app, you need to do two things:

  1. 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
    ---
  2. Add it the file to the table of contents.

  • 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

About

A mono repo for the new flutter by example web app.


Languages

Language:Dart 73.6%Language:CSS 13.9%Language:HTML 12.5%