Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
51cd8b67
Commit
51cd8b67
authored
Sep 16, 2016
by
Dragoș Tiselice
Committed by
GitHub
Sep 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a stretch Positioned constructor. (#5894)
Fixes #5835.
parent
573eaf0b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
20 deletions
+17
-20
card_collection.dart
dev/manual_tests/card_collection.dart
+1
-5
cards_demo.dart
examples/flutter_gallery/lib/demo/cards_demo.dart
+1
-5
grid_tile.dart
packages/flutter/lib/src/material/grid_tile.dart
+1
-5
tooltip.dart
packages/flutter/lib/src/material/tooltip.dart
+1
-5
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+13
-0
No files found.
dev/manual_tests/card_collection.dart
View file @
51cd8b67
...
...
@@ -363,11 +363,7 @@ class CardCollectionState extends State<CardCollection> {
// size of the background,card Stack will be based only on the card. The
// Viewport ensures that when the card's resize animation occurs, the
// background (text and icons) will just be clipped, not resized.
Widget
background
=
new
Positioned
(
top:
0.0
,
right:
0.0
,
bottom:
0.0
,
left:
0.0
,
Widget
background
=
new
Positioned
.
stretch
(
child:
new
Container
(
margin:
const
EdgeInsets
.
all
(
4.0
),
child:
new
Viewport
(
...
...
examples/flutter_gallery/lib/demo/cards_demo.dart
View file @
51cd8b67
...
...
@@ -61,11 +61,7 @@ class TravelDestinationItem extends StatelessWidget {
height:
184.0
,
child:
new
Stack
(
children:
<
Widget
>[
new
Positioned
(
left:
0.0
,
top:
0.0
,
bottom:
0.0
,
right:
0.0
,
new
Positioned
.
stretch
(
child:
new
Image
.
asset
(
destination
.
assetName
,
fit:
ImageFit
.
cover
...
...
packages/flutter/lib/src/material/grid_tile.dart
View file @
51cd8b67
...
...
@@ -38,11 +38,7 @@ class GridTile extends StatelessWidget {
return
child
;
final
List
<
Widget
>
children
=
<
Widget
>[
new
Positioned
(
top:
0.0
,
left:
0.0
,
bottom:
0.0
,
right:
0.0
,
new
Positioned
.
stretch
(
child:
child
)
];
...
...
packages/flutter/lib/src/material/tooltip.dart
View file @
51cd8b67
...
...
@@ -265,11 +265,7 @@ class _TooltipOverlay extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Positioned
(
top:
0.0
,
left:
0.0
,
right:
0.0
,
bottom:
0.0
,
return
new
Positioned
.
stretch
(
child:
new
IgnorePointer
(
child:
new
CustomSingleChildLayout
(
delegate:
new
_TooltipPositionDelegate
(
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
51cd8b67
...
...
@@ -1517,6 +1517,19 @@ class Positioned extends ParentDataWidget<Stack> {
bottom
=
null
,
super
(
key:
key
,
child:
child
);
/// Creates a Positioned object with [left], [top], [right], and [bottom] set
/// to 0.0 unless a value for them is passed.
Positioned
.
stretch
({
Key
key
,
Widget
child
,
this
.
left
:
0.0
,
this
.
top
:
0.0
,
this
.
right
:
0.0
,
this
.
bottom
:
0.0
})
:
width
=
null
,
height
=
null
,
super
(
key:
key
,
child:
child
);
/// The distance that the child's left edge is inset from the left of the stack.
///
/// Only two out of the three horizontal values ([left], [right], [width]) can be
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment