linter: Convert Flutter utilities into extension getters and methods There were some surprising wins in here that I'm happy with. They can be seen in the call-sites in the various lint rules below. There were two top-level functions (`isWidgetTypeContainer`, `isWidgetTypeSizedBox`) that _were_ concerned with the `staticType` of an InstanceCreationExpression. This isn't a coincidence: when a developer is writing Flutter code, they _never_ mess with an instantiated Widget; all they do is _instantiate_ a Widget. So we can conveniently just make these extension getters on InstanceCreationExpression instead, and make the getters more friendly. Several of these top-level functions answer a question about a `DartType?` object. (`isWidgetProperty`, `isWidgetType`, `isBuildContext`.) Each of these are moved to be an extension getter or method on `DartType?`. `isKDebugMode` answers a question about an `Element?`, so it is made an extension getter. `isState` and `isStatefulWidget` answer questions about `InterfaceElement`s, and can each be moved to be extension getters. Change-Id: Ibe45095c612363f470b96719871ed36728f62e66 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471886 Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Dart is:
Approachable: Develop with a strongly typed programming language that is consistent, concise, and offers modern language features like null safety and patterns.
Portable: Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend. Compile to JavaScript or WebAssembly for the web.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app. Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents in our repo at docs.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
Future plans for Dart are included in the combined Dart and Flutter roadmap on the Flutter wiki.