mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Based on the (internal) discussion around converging on using the official Dart style guide, the design discussion https://flutter.dev/go/use-dart-style-in-flutter-engine, and with the exception of the code that gets published under `dart:ui` (as that is user-facing, and we'd like to evolve the code style in conjunction with the framework), we're going to be (gradually) adopting the Dart style guide in `flutter/engine`. For now, we: - Remove `always_specify_types` (except for `lib/ui`, i.e. `dart:ui`) - Re-enable `type_annotate_public_apis` (which is now relevant since the above is disabled) - Announce our _intent_ to re-format and apply the Dart formatter (which we'll land in the near future) --- I also took the opportunity to specify more about our style guide use in general, mostly to make it easier to understand our conventions, and also call out known problem areas (notably, our over-use of `shared_ptr` and `auto` in some cases). I am happy to split those up, but it was easier to make the markdown changes at once. I also took @cbracken and folks advice and clarified directly that explicit types in Dart are _not_ bad (with examples).