Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update Sep 2014:</strong> <a href="http://news.dartlang.org/2014/08/dart-16-adds-support-for-deferred.html" rel="nofollow noreferrer">this has been fixed!</a></p> <p>Dart now easily supports deferred loading with special <code>import... deferred</code> syntax. For example:</p> <pre><code>import analytics.dart deferred as analytics void main(){ analytics.loadLibrary.then((_) { // future // code ready enableAnalyticsControl() }); } </code></pre> <p>Here is <a href="https://www.dartlang.org/docs/spec/deferred-loading.html" rel="nofollow noreferrer">an official tutorial</a> about using deferred loading.</p> <hr> <p>I'm afraid what you're trying to do is still not possible (assuming you're not using dart2js that is) .</p> <p>See <a href="https://code.google.com/p/dart/issues/detail?id=10171" rel="nofollow noreferrer">this issue</a>.</p> <blockquote> <p>As Kasper said in comment 3, so far this has been discussed a deployment feature which you will get with dart2dart. The VMs involvement in supporting this ends with giving the dart2dart generated code access to loading sources lazily through a library call. This library API still needs to be specified though.</p> </blockquote> <p>If you <em>are</em> using dart2js this can be done. <a href="http://blog.sethladd.com/2013/04/lazy-load-libraries-in-dart.html" rel="nofollow noreferrer">Here is a blog post on how to do this.</a></p> <pre><code>const lazy = const DeferredLibrary('reverser', uri: './part.js'); </code></pre> <p>Which will then let you call <code>lazy.load().then((_) { ...</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload