From f373617a7693fa12d0354f113a33c76705cc0eb1 Mon Sep 17 00:00:00 2001 From: Seth Ladd Date: Wed, 27 Apr 2016 11:33:00 -0700 Subject: [PATCH] add import guidance to library-level docs (#3530) * add import guidance to library-level docs * add import docs to other packages * fix review comment * clarify which libraries aren't meant to be directly imported --- packages/cassowary/lib/cassowary.dart | 3 +++ packages/flutter/lib/animation.dart | 2 ++ packages/flutter/lib/gestures.dart | 2 ++ packages/flutter/lib/http.dart | 2 ++ packages/flutter/lib/material.dart | 2 ++ packages/flutter/lib/painting.dart | 2 ++ packages/flutter/lib/rendering.dart | 2 ++ packages/flutter/lib/scheduler.dart | 2 ++ packages/flutter/lib/services.dart | 2 ++ packages/flutter/lib/widgets.dart | 2 ++ packages/newton/lib/newton.dart | 3 +++ 11 files changed, 24 insertions(+) diff --git a/packages/cassowary/lib/cassowary.dart b/packages/cassowary/lib/cassowary.dart index e98dab2ccb..905bf933f2 100644 --- a/packages/cassowary/lib/cassowary.dart +++ b/packages/cassowary/lib/cassowary.dart @@ -3,6 +3,9 @@ // found in the LICENSE file. /// An implementation of the Cassowary constraint solving algorithm in Dart. +/// +/// This library is not meant to be imported by developers. +/// It will soon be integrated into another Flutter library. /// /// This is used by the [RenderAutoLayout] render object in the rendering /// library and by the [AutoLayout] widget in the widget library. diff --git a/packages/flutter/lib/animation.dart b/packages/flutter/lib/animation.dart index eb86a879b2..9c22eb8feb 100644 --- a/packages/flutter/lib/animation.dart +++ b/packages/flutter/lib/animation.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// The Flutter animation system. +/// +/// To use, import `package:flutter/animation.dart`. /// /// See [flutter.io/animations](https://flutter.io/animations/) for an overview. /// diff --git a/packages/flutter/lib/gestures.dart b/packages/flutter/lib/gestures.dart index 67cc881b34..edc3f49b10 100644 --- a/packages/flutter/lib/gestures.dart +++ b/packages/flutter/lib/gestures.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// The Flutter gesture recognizers. +/// +/// To use, import `package:flutter/gestures.dart`. library gestures; export 'src/gestures/arena.dart'; diff --git a/packages/flutter/lib/http.dart b/packages/flutter/lib/http.dart index d6ed90774e..09585d57a5 100644 --- a/packages/flutter/lib/http.dart +++ b/packages/flutter/lib/http.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// A [Future]-based library for making HTTP requests. +/// +/// To use, import `package:flutter/http.dart`. /// /// This library is based on Dart's `http` package, but differs in that it is a /// `mojo`-based HTTP client and does not have a dependency on mirrors. diff --git a/packages/flutter/lib/material.dart b/packages/flutter/lib/material.dart index b936002676..58d6bea208 100644 --- a/packages/flutter/lib/material.dart +++ b/packages/flutter/lib/material.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// Flutter widgets implementing Material Design. +/// +/// To use, import `package:flutter/material.dart`. /// /// See /// [www.google.com/design/spec/material-design](https://www.google.com/design/spec/material-design/introduction.html) diff --git a/packages/flutter/lib/painting.dart b/packages/flutter/lib/painting.dart index d09bd5c048..ec79ce13de 100644 --- a/packages/flutter/lib/painting.dart +++ b/packages/flutter/lib/painting.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// The Flutter painting library. +/// +/// To use, import `package:flutter/painting.dart`. /// /// This library includes a variety of classes that wrap the Flutter /// engine's painting API for more specialised purposes, such as painting scaled diff --git a/packages/flutter/lib/rendering.dart b/packages/flutter/lib/rendering.dart index 466098407d..d3ff0c94a1 100644 --- a/packages/flutter/lib/rendering.dart +++ b/packages/flutter/lib/rendering.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// The Flutter rendering tree. +/// +/// To use, import `package:flutter/rendering.dart`. /// /// The [RenderObject] hierarchy is used by the Flutter Widgets /// library to implement its layout and painting back-end. Generally, diff --git a/packages/flutter/lib/scheduler.dart b/packages/flutter/lib/scheduler.dart index 49a9aee541..a21438c83e 100644 --- a/packages/flutter/lib/scheduler.dart +++ b/packages/flutter/lib/scheduler.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// The Flutter Scheduler library. +/// +/// To use, import `package:flutter/scheduler.dart`. /// /// This library is responsible for scheduler frame callbacks, and tasks at /// given priorities. diff --git a/packages/flutter/lib/services.dart b/packages/flutter/lib/services.dart index 20b139f58b..6562107e1f 100644 --- a/packages/flutter/lib/services.dart +++ b/packages/flutter/lib/services.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// System services exposed to Flutter apps. +/// +/// To use, import `package:flutter/services.dart`. /// /// For example, this library includes [fetch], which fetches data from the /// network. diff --git a/packages/flutter/lib/widgets.dart b/packages/flutter/lib/widgets.dart index a4639464a9..4709f6770a 100644 --- a/packages/flutter/lib/widgets.dart +++ b/packages/flutter/lib/widgets.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. /// The Flutter widget framework. +/// +/// To use, import `package:flutter/widgets.dart`. library widgets; export 'src/widgets/app.dart'; diff --git a/packages/newton/lib/newton.dart b/packages/newton/lib/newton.dart index c56aa1d73f..07899fcd8b 100644 --- a/packages/newton/lib/newton.dart +++ b/packages/newton/lib/newton.dart @@ -4,6 +4,9 @@ /// Simple one-dimensional physics simulations, such as springs, friction, and /// gravity, for use in user interface animations. +/// +/// This library is not meant to be imported by developers. +/// It will soon be integrated into another Flutter library. library newton; export 'src/clamped_simulation.dart';