Git Product home page Git Product logo

dart-tutorials-samples's Introduction

DISCONTINUED

This repo has been discontinued.

For current samples, please see:


These are small Dart samples used by the online Dart tutorials.

Each directory in this repo represents a tutorial. The homepage field in each pubspec file points to the corresponding tutorial on dart.dev.

DartPad and Gist Files

Some of the tutorial examples execute using DartPad. The DartPad examples are organized so that each complete example is placed in a subdirectory, with its own pubspec and web/ directory.

DartPad grabs the source for these examples from gist files. The gist files are generated from the source in this repo using the gist generator.

You can update the gist files, as follows:

  • Clone the repo.
  • If needed, activate the gist executable: pub global activate --source git https://github.com/kasperpeulen/gist-generator
  • Change directory to the top of the repo.
  • Run "gist generate". See the readme for information on available options. If you are updating, or creating, gist files rather than generating a test gist, or performing a dry run of the gist generator, you'll need to provide a Gist token. (See the project lead for info on obtaining an existing Gist token.)

Additional files

README.md: This file.

runtests.sh: BASH script that runs dartanalyzer on all Dart source files in the web/ and bin/ directories.

dart-tutorials-samples's People

Contributors

abicorios avatar adam-singer avatar butlermatt avatar chalin avatar cwesdorp avatar d2m avatar domesticmouse avatar franklinyow avatar jakemac53 avatar jddeep avatar kasperpeulen avatar kevmoo avatar kwalrath avatar marycampione avatar mit-mit avatar natebosch avatar sethladd avatar sfshaza2 avatar sigmundch avatar thulka avatar whesse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dart-tutorials-samples's Issues

Change async modifier to defer in Dart scripts

An async script executes before the whole page is available (in chrome), but defer waits until the page has loaded. In cases where you want to make sure that all the DOM on the initial page is available from within your main function, you should use defer instead of async.

<script defer src="index.dart" type="application/dart"></script>
<script defer src="packages/browser/dart.js"></script>

Pull requests welcome.

Archive this repo

After making sure all its source code that's still used is on site-www.

Failed to load resource: clickme/web/packages/browser/dart.js

Hi,

I am new to Dart. I just create the first web application clickme according to the tutorial http://www.dartlang.org/docs/tutorials/get-started/.
The strange thing is that it can not load resource dart.js
Then I see the error message in console, it seems like wrong path to the js file. Then I just change the path in clickme.html to src="../packages/browser/dart.js", then it works fine. So I think since after create new project, the html file which is in the web folder, so static directory would be under /web, but the dart.js is under /packages/browser, so I think maybe it is something wrong in the configuration or just typo mistake in clickme.html ?
I think it is better to fix this bug, because it is just begin to try Dart :)

06-polymer little ben no longer working

importing tutorial 06-polymer little ben-model/element, i get this error when attempting to run the project:

Internal error: 'package:polymer/custom_syntax.dart': Error: line 17 pos 28: cannot resolve class 'CustomBindingSyntax' from '_ExtraSyntax@0x1ac2292a'
class _ExtraSyntax extends CustomBindingSyntax {

I am using last version of dart editor and 0.7.1 polymer version

passing data via attributes does not work outside of a template

In: dart-tutorials-samples / web / target08 / drseuss

If I comment out the drseuss template part, then I cannot pass a value to tute-converter.
That seems a big limitation as we want people to use our custom elements without necessarily go into the pain of embedding them in a template.

What do you think?

<!--div> sdsd
<template id="drseuss" bind>
<tute-converter ratio="{{}}" class="tute-converter">
<label class="label-one"> Thing One </label>
<label class="label-two"> Thing Two </label>
</tute-converter>
</template>
</div-->
<tute-converter ratio="0.6" class="tute-converter">
<label class="label-one"> Thing One </label>
<label class="label-two"> Thing Two </label>
</tute-converter>
<script type="application/dart" src="index.dart"></script>
<script src='packages/polymer/boot.js'></script>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.