Tensegritics / Tensegritics/ClojureDart

Suggestion: Refactor "Your first app!" and Dart+Flutter Quick Start source code

Open
#341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
1.6k
Forks
119
PR merge metrics
No merged PRs in 30d

Description

I apologize if you are already aware of this.

I also apologize if this is what, in American English, we call "nitpicking."

I recommend that you modify the CLJD code in your "Your first app!" and "ClojureDart+Flutter Quick Start" examples to reflect the nesting of attributes found in canonical Flutter code.

To wit, instead of this:

(defn main []
  (f/run
    (m/MaterialApp
      .title "Welcome to Flutter"
      .theme (m/ThemeData .primarySwatch m.Colors/pink))
    .home
    (m/Scaffold
      .appBar (m/AppBar
                .title (m/Text "Welcome to ClojureDart")))
    .body
    m/Center
    (m/Text "Let's get coding!"
       .style (m/TextStyle
                .color m.Colors/red
                .fontSize 32.0))))

I recommend that you use this:

(defn main []
  (f/run
   (m/MaterialApp
    .title "Welcome to Flutter"
    .theme (m/ThemeData .primarySwatch m.Colors/pink)
    .home (m/Scaffold
           .appBar (m/AppBar .title (m/Text "Welcome to ClojureDart"))
           .body (m/Center .child (m/Text "Let's get coding!"
                                          .style (m/TextStyle
                                                  .color m.Colors/red
                                                  .fontSize 32.0)))))))

I will readily admit that through the power of CLJD, equivalent Dart code is emitted, regardless of whether the input is the current intro example or the version that I suggested which better reflects typical, valid Flutter code.

I recommend that you consider updating your docs just to make the transition from Dart/Flutter to ClojureDart/Flutter smoother for folks who might be confused by the altered nesting. ;-)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the “Your first app!” and “ClojureDart+Flutter Quick Start” examples in the documentation and compare their widget nesting with the suggested snippets in this issue. Update the examples to use the suggested nesting, then verify that both examples still represent valid ClojureDart/Flutter introductory code.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, dart, flutter
Domain
documentation, mobile
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.