p-hatan/ mirror

pub repository

mirror.p-hatan.ir

meta

1.1.7

This library contains the definitions of annotations that provide additional semantic information about the program being annotated. These annotations are intended to be used by tools to provide a better user experience.

Download archive

Readme

Annotations for Static Analysis

This package defines annotations that can be used by the tools that are shipped with the Dart SDK.

Library Structure

The annotations in this package are defined in two libraries.

The library in meta.dart defines annotations that can be used by static analysis tools to provide a more complete analysis of the code that uses them. Within the SDK, these tools include the command-line analyzer (dartanalyzer) and the analysis server that is used to power many of the Dart-enabled development tools.

The library in dart2js.dart defines annotations that provide hints to dart2js to improve the quality of the JavaScript code that it produces. These annotations are currently experimental and might be removed in a future version of this package.

Support

Post issues and feature requests on the GitHub issue tracker.

Questions and discussions are welcome at the Dart Analyzer Discussion Group.

License

See the LICENSE file.

Changelog

1.1.7

  • Introduce @sealed to declare that a class or mixin is not allowed as a super-type.

    Only classes in the same package as a class or mixin annotated with @sealed may extend, implement or mix-in the annotated class or mixin. (SDK issue 27372).

1.1.6

  • Set max SDK version to <3.0.0.

1.1.5

  • Introduce @isTest and @isTestGroup to declare a function that is a test, or a test group.

1.1.4

  • Added dart2js.dart.

1.1.2

  • Rollback SDK constraint update for 2.0.0. No longer needed.

1.1.1

  • Update SDK constraint to be 2.0.0 dev friendly.

1.1.0

  • Introduce @alwaysThrows to declare that a function always throws (SDK issue 17999). This is first available in Dart SDK 1.25.0-dev.1.0.

    import 'package:meta/meta.dart';
    
    // Without knowing that [failBigTime] always throws, it looks like this
    // function might return without returning a bool.
    bool fn(expected, actual) {
      if (expected != actual)
        failBigTime(expected, actual);
      else
        return True;
    }
    
    @alwaysThrows
    void failBigTime(expected, actual) {
      throw new StateError('Expected $expected, but was $actual.');
    }
    

1.0.5

  • Introduce @experimental to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change.

1.0.4

  • Introduce @virtual to allow field overrides in strong mode (SDK issue 27384).

    import 'package:meta/meta.dart' show virtual;
    class Base {
      @virtual int x;
    }
    class Derived extends Base {
      int x;
    
      // Expose the hidden storage slot:
      int get superX => super.x;
      set superX(int v) { super.x = v; }
    }
    

1.0.3

  • Introduce @checked to override a method and tighten a parameter type (SDK issue 25578).

    import 'package:meta/meta.dart' show checked;
    class View {
      addChild(View v) {}
    }
    class MyView extends View {
      // this override is legal, it will check at runtime if we actually
      // got a MyView.
      addChild(@checked MyView v) {}
    }
    main() {
      dynamic mv = new MyView();
      mv.addChild(new View()); // runtime error
    }
    

1.0.2

  • Introduce @visibleForTesting annotation for declarations that may be referenced only in the library or in a test.

1.0.1

  • Updated @factory to allow statics and methods returning null.

1.0.0

  • First stable API release.

0.12.2

  • Updated @protected to include implemented interfaces (linter#252).

0.12.1

  • Fixed markdown in dartdocs.

0.12.0

  • Introduce @optionalTypeArgs annotation for classes whose type arguments are to be treated as optional.

0.11.0

  • Added new Required constructor with a means to specify a reason to explain why a parameter is required.

0.10.0

  • Introduce @factory annotation for methods that must either be abstract or must return a newly allocated object.
  • Introduce @literal annotation that indicates that any invocation of a constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant.

0.9.0

  • Introduce @protected annotation for members that must only be called from instance members of subclasses.
  • Introduce @required annotation for optional parameters that should be treated as required.
  • Introduce @mustCallSuper annotation for methods that must be invoked by all overriding methods.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add meta
pubspec.yaml
name: meta
version: 1.1.7
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/meta
description: >
 This library contains the definitions of annotations that provide additional
 semantic information about the program being annotated. These annotations are
 intended to be used by tools to provide a better user experience.
environment:
  sdk: '>=1.12.0 <3.0.0'

Version history

VersionPublishedArchiveSHA-256
0.2.72012-11-30T21:24:54.760980ZDownloadb7774b7421ecb7e9a924f1282dd633e4aa904b64e2189083d5c59db43b53f73d
0.2.8+22012-12-11T21:51:44.624870ZDownloadcf63613295165f414bdcacecb7bfbffb95239f365cb43dd9f3a784cd61a569a9
0.2.9+72012-12-18T18:01:30.468540ZDownloadf7cbc0f83f0d0610e2406838adb1e8c3b5be143fbc281aad9865b39cfc7e4a53
0.2.10+12013-01-09T01:29:37.906370ZDownload421f8c74b1ef4ed0b0abc666081dfa6e3253d7bb520efd1f3aa44ab1a6914005
0.3.1+12013-01-22T22:02:12.356900ZDownload2d11f345fe0204030f5c546e9cf6b909fa1c5903e1d30b7421aea9b7d5f8dc9a
0.3.22013-01-28T20:39:38.301950ZDownloadc4ae6b034fe81c1bf2a66fc94525d18ce91bb0e63cb685ca4af220811755a3bb
0.3.42013-02-05T17:01:05.870610ZDownloadfaaa31bd3d5abc2140cc8295ca4368cdeb40c6318d1b4913e6e8651db835214f
0.3.5+12013-02-11T19:58:03.294090ZDownload1ea45b3f6ce060170f82724c9073ab1df4d93ee34a637200cc2e3bb0be9853f5
0.3.7+62013-02-20T20:46:17.013710ZDownload1e329e121be238747438f9cc0e712175c37c1c9caf769764b5065763d944d423
0.4.02013-02-25T18:40:59.556130ZDownload03483e3611d554aaf6887fa739fd082fe1a4d82ee58a51d15eb6e9bf19f2d71b
0.4.12013-03-05T19:05:27.156910ZDownload98f72ae70e3b0c88f8dddf9043ade46b3fa9a7c943cbccb85cf5ac53d00348c7
0.4.1+12013-03-05T19:11:14.760010ZDownloadc8e22ff8db15bc49ef1bc9824015e7625a15998798ff2f04ba386e23695a6b96
0.4.22013-03-16T00:14:26.215810ZDownload55e3234f9aedbf648e699168a14cb99a90dc1fd3a033a3539741bbae6e2cbeca
0.4.3+12013-03-25T19:53:44.121380ZDownload6e781aa763e0e5e47bdc1e19fc031fe1b87eff4dfa34e1b63d7dde99924ff91e
0.4.4+42013-04-03T17:57:38.302940ZDownload9374dd08232503c1c1cf5ff0ccfc67056fcf945884fd83991ee5533d70fb83a2
0.4.5+12013-04-08T23:14:18.675650ZDownload23ae25bee519d0092df436e7487f5158acdbbb915838378a67b948e2c88e6d41
0.4.7+12013-04-16T15:42:51.361230ZDownloade1ec947da65b5067c64d9d2d7848c66ff513b2a709cf8fb203027ab8e26df39e
0.5.0+12013-04-23T00:51:24.890400ZDownload4d119d651c0272b0eb6d8b9f1b3339e9d4b986b5987ae42829f90dee1abc5e43
0.5.12013-04-29T18:52:56.155520ZDownloade7e22542338eeb59da3349c6601b5693c0923533e0f2b485acdeb562476a3c12
0.5.42013-05-03T16:42:46.916090ZDownload26da983ad96fc0998a5db68165c11196c6ab4c54b9bba3d90539114f3375cafa
0.5.52013-05-06T19:19:40.815970ZDownload758f8af4d5c4b3e4967ed1be7093ae3bd1f4cfce3d54a215ba25248cd5d4fe23
0.5.62013-05-08T16:42:55.313950ZDownload0ce1f0e74859a0aef4ecef73a210b6912503e539c53c8230f2a57eb01816e198
0.5.72013-05-10T05:06:30.745200ZDownload5318ab5b4bba0b0238333c7be8682b4bf082f460980cbb872f99745068d3c7cf
0.5.92013-05-20T15:47:00.496930ZDownload735157911b1878fb810a59fb6e3104214b6b80b03845340bbecf4ee4481fd9aa
0.5.11+12013-05-29T00:09:50.196380ZDownload63e508a8a2f544c65b369e427dffbbab8fdbf971cdb589910c5820e262910000
0.5.122013-05-29T18:32:02.485650ZDownload821e19e9cd0805b1eea65d85915c91dfc288decbd41c920593ad86b999124046
0.5.132013-06-03T16:05:37.547660ZDownloadbb4af1901e8fca4a0c400619df24e80cd445012a9b1c286cb1aadaefa01b2d79
0.5.14+12013-06-05T15:05:34.782250ZDownloadf7765c0cc226b64158638dfd9166a7cd1c93bc1bac2b3189cab9c2cb32a6e354
0.5.14+32013-06-06T16:37:44.021310ZDownloadecc5b02f10a717c595305990c8bf615f181e5360a155c555f2ddd2f551ba7c19
0.5.152013-06-07T23:01:59.505270ZDownload6bdbbfa3cf51c28b1ac54aeb0104fa8090b5f1ea4bba7ce36e18d4a433db9135
0.5.162013-06-10T16:38:48.358080ZDownloadbb2cac90ca1c2c7d3635fcc092ae4e64d6eb63d2ba28b0287c4bfa5e54b4036a
0.5.172013-06-12T17:53:40.996370ZDownloadd7c4cdc8b98689b76bfaefd8559cdaf97a7139a789308ffbd3f873109e5dcec6
0.5.202013-06-17T22:09:03.361990ZDownloadd0b66862133205583c3dabfe6afed3c56fbe86c80e263e34b618d6dd266fed8b
0.6.12013-06-27T19:33:28.600590ZDownload405e8ac7d7477c535e97b7ec297a2eabfa6b65296a14236de47b0e4b35412598
0.6.22013-06-28T20:56:20.260800ZDownload6a2640210857437fe864bfe599754eda88a815c21632ede3bbf6de6f33eabc6f
0.6.3+12013-07-09T00:24:21.174630ZDownload1552c487fee4b4f729f631b3f639d7a237885e443d057c4238298be347cc014a
0.6.52013-07-16T00:19:43.882070ZDownload5edb4dc0548ed49280dc5b48a5d5de4dca596e934d4ff698b5c23b07edc72ed1
0.6.62013-07-17T19:41:55.628810ZDownload8e0f1b4e637e846a00519861bcf4ee8d2bf8051859bd89f03e7937f2accd9a78
0.6.82013-07-19T20:55:49.359500ZDownload523a38c367560771566ffb07be232ea0298149fa6b95e8b4f5619264792e0655
0.6.92013-07-22T15:14:17.463440ZDownload5860b2ecdaa6199e9506b910bfa49a90fcd89b65c9dc0ca20712485107a37dad
0.6.9+22013-07-24T03:58:53.751360ZDownload8364c04b2c3881d381e8fe8430aaa1e4b12a3a22a386eda3ea6128a8d9c6c260
0.6.112013-07-25T05:09:58.147980ZDownload5199d9697d7a0f30f193162f265629525fd8c41ab2f9121a3081d47611f1c1f3
0.6.122013-07-26T20:06:13.384080ZDownloadda58076a4bd64c7cf7462ecbe4ce1bacda23f38cc861974838b75bbe512dc0a7
0.6.132013-07-30T21:56:16.589410ZDownload61f79ce268a531580c424395926f8341a54f61f94feba14a890d7d1c3e0facbb
0.6.142013-08-02T16:25:14.678880ZDownload2a1db1906120523d6e9da4eb2929105a9d545c081c5bf58205a9e1ea6edfeaf1
0.6.15+22013-08-05T22:49:55.972610ZDownload57fac039c8af728e68c7b4d45c66c9789b696129811a5f4248164082fcb8e2bf
0.6.15+32013-08-06T20:13:09.975910ZDownload7fb660fe6a05b2735fc15872ad2aaba8131b36076c3c5802208cb2d332549192
0.6.172013-08-10T17:35:36.680570ZDownloadef2197e71efc32a8ae593d2ae34a2f46488ce6363407b0b4be70f70e14f6a09e
0.6.17+22013-08-12T22:22:07.160300ZDownload31a6adda9345c7b490e5f8045e074c8f5b3fb6617ac57f9e1adc8ca319b0ad6d
0.6.192013-08-19T16:11:09.565380ZDownload846dd35236a27e46d21cb49877ecfcb20b69041649d5af29fd895221f6e52020
0.6.20+12013-08-22T18:19:31.712510ZDownloadf0ccf3127f32bc69741a7b4c5bf08158dad0dd5f8691ad5601d82f90584dbc5b
0.6.21+32013-08-26T17:43:03.847050ZDownloadb7d6de1572eb86048489a23ddbcf9ee752030db6a1424fe65a85a6c26944144c
0.7.02013-08-28T19:29:17.518260ZDownloadd11510293fd8b743fb74ce1e1fdad399ca025c716744b2416140477feca045f7
0.7.12013-09-03T15:51:52.293210ZDownload3bff00f31c07d7a243c351896e48cd4c630b9928aa66200c631bbec953f0bf6b
0.7.22013-09-06T15:51:39.423950ZDownload2941b0347729958289d9cb89e39d0bbb7c7d70fecc47b838ed464b56dea1dcf5
0.7.2+12013-09-08T15:47:36.141070ZDownload138442dcdc38f704058e72fc740b009aace49f93b0febf70d3d80ccb8bbe70e7
0.7.3+12013-09-16T15:44:18.570020ZDownloadafdefc5c75bb875a1332ab9a60953b6a4e8956bb508a961fc27d47505b075474
0.7.42013-09-18T03:04:04.429430ZDownload0876c53cc8570e48b2c6487fa6efa65b78f8145587d45897b53a77452d5b6d32
0.7.52013-09-21T00:42:05.058670ZDownloade90088ea3164e516b66bacf0eb9581059488fbd8db788de8b6b11b8b6d9132fb
0.7.62013-09-27T14:57:50.957190ZDownload3b13dede9cc6eed3fbdeab1adcce07b805d58b542d11a001e27c1607586cbf4f
0.7.6+42013-10-01T23:48:59.169360ZDownload7d77dfe02c7df53406b6353d98b50d404259290bbba771a6b901769e28696998
0.8.02013-10-03T16:27:42.234180ZDownload6f2350b94b469a14b2d98854f33508a98c5996ae972d66a86bc10db0a272a35d
0.8.12013-10-04T21:54:36.141580ZDownload21b7e739d5e7ff9f836b5792cc2efab5a0b39f7ae6b0d8440c8a0e40451cf33d
0.8.22013-10-14T21:43:48.676150ZDownload833c9eb93b6fae7405c0aec322dc21de3023b0fd32c684c5228e588e4333f286
0.8.32013-10-17T16:00:43.882970ZDownloadb010fdec89581c68fd75b00546f9cef44d437ab143aa7b455d0a5779f04a1604
0.8.42013-10-19T21:08:54.072800ZDownloadd1c28ea01f3984ec199db91277e0ac8d786f095e070a184f955ed28b92dcf4d1
0.8.52013-10-21T15:50:35.196440ZDownload2a9fecf67888bc038a559c17ef04f870291e1d19870da80fcec71baeedf2bce8
0.8.62013-10-24T08:19:18.502720ZDownloadd0d6c67513cd2c70bc88f0b057cb263364e41b193bde439fe86b9b7f4d123cc1
0.8.72013-10-28T14:33:49.320040ZDownload707eb4ffd57e3f2fe71cdca877ed3744655e2972996a11daa64d9571cedc40ca
0.8.82013-10-30T03:29:34.718920ZDownload0f48ee470a945b3762e4c584243874f17c8fc73a6f903991a8775fa1e64bb408
0.9.02016-02-26T17:19:26.953ZDownloadacb97acd3ddf9dbb06f2d3ddfc4caa9ecf9432b36f77a4a4bb25b63670b3fbdc
0.10.02016-03-03T18:53:46.852ZDownloadee12d7b6e073a9c801327c486dedb615cd0b7b1b855ff0b4392a33f3ab4152da
0.11.02016-04-06T21:58:15.301ZDownload33ffa183a6eb116d9c990a32c0e48d0b9ca75be9645d9043d989afcf7f1a1c99
0.12.02016-04-12T00:06:50.275ZDownloadcc2af5024ccff40c889cd4cc860c8483be5eb7d53139a3094b6b1e53f0a0d21f
0.12.12016-04-18T21:30:06.871ZDownload5897e608a8acf1f9fb1d01742daf1411bbdd69aacbe1d933d24f127ec7ffd754
1.0.12016-06-27T16:20:14.976ZDownload918f0597e48a6a51e954002088cf23c81a2cc998de65a867152e67dfb2240171
1.0.22016-08-15T19:04:27.424ZDownloadcc443eb2825aef4a2268337316fbd2c2b498c6b181c27665c25ea97276e2da83
1.0.32016-09-14T18:22:35.775ZDownload4ac20641da9e5ab0f9e8f1d9476a6b173df679cb1db3c954e96eb988489e9f1a
1.0.42016-09-20T22:30:37.479ZDownloadfa80faf10b014b40d72f00dfbf60044cd8f7b0b7d317e29634b01fbdc6397287
1.0.52017-03-31T21:44:34.853506ZDownloade48e208fe4b800e77b2198a8a184bc31b0b06b13db4b7db6589c8459fb22af2c
1.1.02017-07-10T22:59:18.042140ZDownload4795c467a5465575a2a9b359b7311c534e94b8d4353698d6f0f0b53103d7f664
1.1.12017-07-19T21:45:02.454579ZDownloadf92bc0f0e958bf4f05c3acf379bc6f67df04555a4bace38b238e89b50c92bc3e
1.1.22017-09-28T19:34:42.110729ZDownloadaa0303db633cbe4da09058615d0299d558446a35574c076c673c7b2785be566e
1.1.52018-05-03T20:53:24.301877ZDownloadacd640aeac01729e21f5720298a94baf4e70da557dcdf7c60258f1134fb1548e
1.1.62018-07-18T22:14:51.041219ZDownload01c921240f09fd89f0d5c5cb22aa54b1cb1e813c6ad614d31f4286a8a6ebc303
1.1.72019-01-03T22:05:32.035385ZDownloadb1552a01a093ac6407c612e14bb0127b704e86edefbdb885958aeaaf191376c2
1.1.82019-10-30T16:17:09.801531ZDownloadf7864e34beedecdb7079e9f31000d01dd09f98f5061de0c692f7e2041771093c
1.2.02020-07-06T14:58:08.031033ZDownload7d251954a7c2a917a8ed97258415adde85061d94009c396a4f5c388df8410971
1.2.12020-07-06T15:14:44.361045ZDownloadc7e9a1176125a8e072b47378203518bd3353304ea9e09a9ab7e9f49e2322fc1f
1.2.22020-07-09T15:41:11.425366ZDownload4c461f27981d03a9ca6d80c32efc84b7e3085eb93e459b2f541035683182d342
1.2.32020-09-02T00:14:02.316705ZDownload890d433e82dd501811492d4b3ebf30937d6a9b6c85fb0b36185413d972e71ba3
1.2.42020-11-18T21:54:07.793940ZDownload89a2bb4653ee4659924e62e256dc1f6a347613fb4c329e3904d16543beae86f9
1.3.0-nullsafety2020-07-09T17:44:35.098517ZDownload156226d5624015e6d16ed5696a44e4a88a6d40f1f485eef9514190d73ef00c89
1.3.0-nullsafety.12020-07-17T16:52:26.539333ZDownloadd9a47ea885bf0517e905573c8920e35767980420bb485d89a47f6da50206bc25
1.3.0-nullsafety.22020-07-22T15:29:19.116323ZDownload4fc4c3e48c2b5ff13da32b97bc08bd1e68defa97680e6375ea4c2d605d041254
1.3.0-nullsafety.32020-09-22T15:28:02.574587ZDownloadf2ab7dd96970e87de7353ad6cb9bb88495c5d9926f9e263fe740ef2209ffbfba
1.3.0-nullsafety.42020-10-09T16:48:54.756900ZDownloadf23c87ecf44d53f95937cddc84fc5fad4471b762c40054f8d296f02e684058ac
1.3.0-nullsafety.52020-10-23T19:44:00.477643ZDownload77e06c485e78a2a214c523184a3b9b469df1dd62162decf2b8ddb367d3e2eae1
1.3.0-nullsafety.62020-11-03T21:18:46.482935ZDownloadae8cd058158e5e46befa6be2c1d1ecc06a83f2cb3d4fda75d764f811da0f236b
1.3.02021-02-02T21:51:40.517962ZDownload98a7492d10d7049ea129fd4e50f7cdd2d5008522b1dfa1148bbbc542b9dd21f7
1.4.02021-05-25T22:47:17.245825ZDownload20e5f2adff8f102b801d1df34100fb772114de478301246bbad5625dd2ef648a
1.5.02021-07-02T21:50:13.903658ZDownload739281d779847800931c54fc83636c505db2076cd2b0003b68277c6d4bb0ee0f
1.6.02021-07-03T00:00:47.671526ZDownload5fc3139fe61eba21fdaabcfd8e4cd4d1a75b925587505f44002937070a4e93d4
1.7.02021-07-07T21:03:35.260776ZDownload5202fdd37b4da5fd14a237ed0a01cad6c1efd4c99b5b5a0d3c9237f3728c9485
1.8.02022-05-18T17:08:59.009541ZDownload6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42
1.9.02023-01-30T22:47:11.404331ZDownload12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b
1.9.12023-03-22T21:03:12.148624ZDownload3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3
1.10.02023-09-06T17:14:28.033524ZDownloada6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
1.11.02023-10-10T22:33:42.660447ZDownloadd584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
1.12.02024-02-06T16:00:09.868490ZDownload7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136
1.14.02024-04-04T15:24:53.867533ZDownload25dfcaf170a0190f47ca6355bdd4552cb8924b430512ff0cafb8db9bd41fe33b
1.15.02024-05-07T15:58:58.517731ZDownloadbdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
1.16.02024-09-19T20:22:46.879597ZDownloade3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
1.17.02025-05-14T22:14:21.904911ZDownload23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394
1.18.02026-01-15T23:20:11.713398ZDownload1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349
1.18.12026-01-27T20:05:47.005713ZDownload9f29b9bcc8ee287b1a31e0d01be0eae99a930dbffdaecf04b3f3d82a969f296f
1.18.22026-03-17T13:33:04.834526ZDownloaddf0c643f44ad098eb37988027a8e2b2b5a031fd3977f06bbfd3a76637e8df739
1.18.32026-06-04T18:01:53.652200ZDownloadc82594181e3312f3d0695fc95aaaf7758d75b8d4ae2bbecf223b9fd5109a059d
1.19.02026-07-09T12:54:28.000531ZDownload307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9

Dependencies

No direct dependencies declared.