1. 11 May, 2020 1 commit
    • Nate Bosch's avatar
      Remove direct uses of LocalPlatform (#56605) · 59a8ef3a
      Nate Bosch authored
      When `const LocalPlatform` is used immediately and not passed as a
      dependency it does not have utility over the static properties from
      `dart:io`. Remove these uses to reduce the noise around how the
      instantiable `Platform` class is used.
      59a8ef3a
  2. 11 Feb, 2020 1 commit
  3. 07 Feb, 2020 1 commit
  4. 08 Jan, 2020 1 commit
  5. 07 Jan, 2020 1 commit
  6. 05 Dec, 2019 1 commit
  7. 27 Nov, 2019 1 commit
    • Ian Hickson's avatar
      License update (#45373) · 449f4a66
      Ian Hickson authored
      * Update project.pbxproj files to say Flutter rather than Chromium
      
      Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
      
      * Update the copyright notice checker to require a standard notice on all files
      
      * Update copyrights on Dart files. (This was a mechanical commit.)
      
      * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
      
      Some were already marked "The Flutter Authors", not clear why. Their
      dates have been normalized. Some were missing the blank line after the
      license. Some were randomly different in trivial ways for no apparent
      reason (e.g. missing the trailing period).
      
      * Clean up the copyrights in non-Dart files. (Manual edits.)
      
      Also, make sure templates don't have copyrights.
      
      * Fix some more ORGANIZATIONNAMEs
      449f4a66
  8. 15 Nov, 2019 1 commit
  9. 10 Sep, 2019 1 commit
  10. 10 Jul, 2019 1 commit
    • Greg Spencer's avatar
      Add anchors to samples (#35906) · 67ee3e19
      Greg Spencer authored
      This adds an "anchor button" to each of the samples so that the user can link to individual samples instead of having to link to just the page. Clicking on the anchor button jumps to the anchor, as well as copying the anchor URL to the clipboard.
      
      There is some oddness in the implementation: because dartdoc uses a <base> tag, the href for the link can't just be "#id", it has to calculate the URL from the current window href. I do that in the onmouseenter and onclick because onload doesn't get triggered for <a> tags (and onmouseenter doesn't get triggered for mobile platforms), but I still want the href to be updated before someone right-clicks it to copy the URL.
      67ee3e19
  11. 02 Jul, 2019 1 commit
  12. 27 Jun, 2019 1 commit
  13. 25 May, 2019 1 commit
    • Chris Bracken's avatar
      Americanise spellings (#33323) · 156b4220
      Chris Bracken authored
      Updates documentation and non-public API to use American spellings for
      consistency with the rest of the codebase.
      
      No changes to behaviour... other than how it's spelt.
      156b4220
  14. 14 May, 2019 1 commit
  15. 01 Mar, 2019 1 commit
    • Alexandre Ardhuin's avatar
      Add missing trailing commas (#28673) · 387f8854
      Alexandre Ardhuin authored
      * add trailing commas on list/map/parameters
      
      * add trailing commas on Invocation with nb of arg>1
      
      * add commas for widget containing widgets
      
      * add trailing commas if instantiation contains trailing comma
      
      * revert bad change
      387f8854
  16. 15 Feb, 2019 1 commit
    • Greg Spencer's avatar
      Remove remaining "## Sample code" segments, and fix the snippet generator. (#27793) · 262f12b4
      Greg Spencer authored
      This converts all remaining "## Sample code" segments into snippets, and fixes
      the snippet generator to handle multiple snippets in the same dartdoc block
      properly.
      
      I also generated, compiled, and ran each of the existing application samples,
      and fixed them up to be more useful and/or just run without errors.
      
      This PR fixes these problems with examples:
      
      1. Switching tabs in a snippet now works if there is more than one snippet in
         a single dartdoc block.
      2. Generation of snippet code now works if there is more than one snippet.
      3. Contrast of text and links in the code sample block has been improved to
         recommended levels.
      4. Added five new snippet templates, including a "freeform" template to make
         it possible to show examples that need to change the app instantiation.
      5. Fixed several examples to run properly, a couple by adding the "Scaffold"
         widget to the template, a couple by just fixing their code.
      6. Fixed visual look of some of the samples when they run by placing many
         samples inside of a Scaffold.
      7. In order to make it easier to run locally, changed the sample analyzer to
         remove the contents of the supplied temp directory before running, since
         having files that hang around is problematic (only a problem when running
         locally with the `--temp` argument).
      8. Added a `SampleCheckerException` class, and handle sample checking
         exceptions more gracefully.
      9. Deprecated the old "## Sample code" designation, and added enforcement for
         the deprecation.
      10. Removed unnecessary `new` from templates (although they never appeared in
         the samples thanks to dartfmt, but still).
      
      Fixes #26398
      Fixes #27411
      262f12b4
  17. 09 Jan, 2019 1 commit
  18. 08 Jan, 2019 1 commit
  19. 12 Dec, 2018 1 commit
    • Janice Collins's avatar
      Allow snippets tool to be run from arbitrary CWDs (#25243) · 4a110b62
      Janice Collins authored
      * Allow snippets tool to be run from arbitrary CWDs
      
      * Drop use of absolute when using Platform.executable (path is not relative, might require PATH resolution)
      
      * canonicalize paths
      
      * Use path.fromUri consistently to resolve file URIs
      
      * Force commit to try to kick Cirrus
      
      * Force commit to kick Cirrus, again
      4a110b62
  20. 08 Nov, 2018 1 commit
  21. 07 Nov, 2018 1 commit
    • Greg Spencer's avatar
      Fixes several bugs in samples, quotes HTML properly, and pre-compiles snippet tool. (#24020) · 094f93df
      Greg Spencer authored
      When converting all of the samples to use the snippet tool, I encountered some bugs/shortcomings:
      
      1. The document production took 90 minutes, since the snippet tool was being invoked from the command line each time. I fixed this by snapshotting the executable before running, so it's down to 7 minutes.
      
      2. The sample code was not being properly escaped by the snippet tool, so generics were causing issues in the HTML output. It is now quoted.
      
      3. Code examples that used languages other than Dart were not supported. Anything that highlight.js was compiled for dartdoc with is now supported.
      
      4. The comment color for highlight.js was light grey on white, which was pretty unreadable. It's now dark green and bold.
      094f93df
  22. 05 Nov, 2018 1 commit
    • Greg Spencer's avatar
      Rewrite the analyze-sample-code script to also analyze snippets (#23893) · 202b045b
      Greg Spencer authored
      This rewrites the sample code analysis script to be a little less of a hack (but still not pretty), and to handle snippets as well.
      
      It also changes the semantics of how sample code is handled: the namespace for the sample code is now limited to the file that it appears in, so some additional "Examples can assume:" blocks were added. The upside of this is that there will be far fewer name collisions.
      
      I fixed the output too: no longer will you get 4000 lines of numbered output with the error at the top and have to grep for the actual problem. It gives the filename and line number of the original location of the code (in the comment in the tree), and prints out the source code on the line that caused the problem along with the error.
      
      For snippets, it prints out the location of the start of the snippet and the source code line that causes the problem. It can't print out the original line, because snippets get formatted when they are written, so the line might not be in the same place.
      202b045b
  23. 23 Oct, 2018 1 commit
    • Greg Spencer's avatar
      Dartdoc snippet extension to inject full featured code snippets in to API docs. (#23281) · 65d3ddd5
      Greg Spencer authored
      This creates a custom dartdoc tool that will generate snippet blocks in our API docs that allow the user to copy easily to the clipboard, and will also embed the snippet code into a template to show it in a larger context with an app.
      
      This PR adds the snippet tool, a template, and a couple of HTML skeleton files, one for snippets that are designed to be in an application setting, and one where it simply puts a nice container around existing snippets, making them easier to copy to the clipboard.
      65d3ddd5