Add more docs to OrientationBuilder (#11233)

This commit is contained in:
Todd Volkert 2017-07-14 11:54:20 -07:00 committed by GitHub
parent 05562d5734
commit 535a364c2a

View File

@ -14,7 +14,8 @@ import 'media_query.dart';
/// Used by [OrientationBuilder.builder]. /// Used by [OrientationBuilder.builder].
typedef Widget OrientationWidgetBuilder(BuildContext context, Orientation orientation); typedef Widget OrientationWidgetBuilder(BuildContext context, Orientation orientation);
/// Builds a widget tree that can depend on the parent widget's orientation. /// Builds a widget tree that can depend on the parent widget's orientation
/// (distinct from the device orientation).
/// ///
/// See also: /// See also:
/// ///
@ -34,6 +35,11 @@ class OrientationBuilder extends StatelessWidget {
super(key: key); super(key: key);
/// Builds the widgets below this widget given this widget's orientation. /// Builds the widgets below this widget given this widget's orientation.
///
/// A widget's orientation is simply a factor of its width relative to its
/// height. For example, a [Column] widget will have a landscape orientation
/// if its width exceeds its height, even though it displays its children in
/// a vertical array.
final OrientationWidgetBuilder builder; final OrientationWidgetBuilder builder;
Widget _buildWithConstraints(BuildContext context, BoxConstraints constraints) { Widget _buildWithConstraints(BuildContext context, BoxConstraints constraints) {