From 535a364c2a7c3168fd4ef365d4fcc27410626bd0 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Fri, 14 Jul 2017 11:54:20 -0700 Subject: [PATCH] Add more docs to `OrientationBuilder` (#11233) --- packages/flutter/lib/src/widgets/orientation_builder.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/widgets/orientation_builder.dart b/packages/flutter/lib/src/widgets/orientation_builder.dart index a5b8eac158..a0688ce011 100644 --- a/packages/flutter/lib/src/widgets/orientation_builder.dart +++ b/packages/flutter/lib/src/widgets/orientation_builder.dart @@ -14,7 +14,8 @@ import 'media_query.dart'; /// Used by [OrientationBuilder.builder]. 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: /// @@ -34,6 +35,11 @@ class OrientationBuilder extends StatelessWidget { super(key: key); /// 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; Widget _buildWithConstraints(BuildContext context, BoxConstraints constraints) {