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
9d900ea7
Commit
9d900ea7
authored
Apr 23, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve dartdoc for extent callbacks (#3514)
Fixes #3510
parent
e7f33586
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
+30
-9
lazy_block.dart
packages/flutter/lib/src/widgets/lazy_block.dart
+14
-0
virtual_viewport.dart
packages/flutter/lib/src/widgets/virtual_viewport.dart
+7
-0
nine_slice_sprite.dart
packages/flutter_sprites/lib/src/nine_slice_sprite.dart
+9
-9
No files found.
packages/flutter/lib/src/widgets/lazy_block.dart
View file @
9d900ea7
...
...
@@ -201,6 +201,20 @@ class _LazyBlockState extends ScrollableState<LazyBlock> {
}
/// Signature used by [LazyBlockViewport] to report its interior and exterior dimensions.
///
/// * The [contentExtent] is the interior dimension of the viewport (i.e., the
/// size of the thing that's being viewed through the viewport).
/// * The [containerExtent] is the exterior dimension of the viewport (i.e.,
/// the amount of the thing inside the viewport that is visible from outside
/// the viewport).
/// * The [minScrollOffset] is the offset at which the starting edge of the
/// first item in the viewport is aligned with the starting edge of the
/// viewport. (As the scroll offset increases, items with larger indices are
/// revealed in the viewport.) Typically the min scroll offset is 0.0, but
/// because [LazyBlockViewport] uses dead reckoning, the min scroll offset
/// might not always be 0.0. For example, if an item that's offscreen changes
/// size, the visible items will retain their current scroll offsets even if
/// the distance to the starting edge of the first item changes.
typedef
void
LazyBlockExtentsChangedCallback
(
double
contentExtent
,
double
containerExtent
,
double
minScrollOffset
);
/// A viewport on an infinite list of variable height children.
...
...
packages/flutter/lib/src/widgets/virtual_viewport.dart
View file @
9d900ea7
...
...
@@ -10,6 +10,13 @@ import 'framework.dart';
import
'package:flutter/rendering.dart'
;
/// Signature for reporting the interior and exterior dimensions of a viewport.
///
/// * The [contentExtent] is the interior dimension of the viewport (i.e., the
/// size of the thing that's being viewed through the viewport).
/// * The [containerExtent] is the exterior dimension of the viewport (i.e.,
/// the amount of the thing inside the viewport that is visible from outside
/// the viewport).
typedef
void
ExtentsChangedCallback
(
double
contentExtent
,
double
containerExtent
);
/// An abstract widget whose children are not all materialized.
...
...
packages/flutter_sprites/lib/src/nine_slice_sprite.dart
View file @
9d900ea7
...
...
@@ -81,7 +81,7 @@ class NineSliceSprite extends NodeWithSize with SpritePaint {
List
<
Point
>
_vertices
;
List
<
Point
>
_textureCoordinates
;
List
<
Color
>
_colors
;
List
<
int
>
_indic
i
es
;
List
<
int
>
_indices
;
@override
void
paint
(
Canvas
canvas
)
{
...
...
@@ -157,7 +157,7 @@ class NineSliceSprite extends NodeWithSize with SpritePaint {
}
// Build indices.
_indic
i
es
=
<
int
>[];
_indices
=
<
int
>[];
for
(
int
y
=
0
;
y
<
3
;
y
+=
1
)
{
for
(
int
x
=
0
;
x
<
3
;
x
+=
1
)
{
// Check if we should skip the middle rectangle.
...
...
@@ -167,13 +167,13 @@ class NineSliceSprite extends NodeWithSize with SpritePaint {
// Add a rectangle (two triangles).
int
index
=
y
*
4
+
x
;
_indic
i
es
.
add
(
index
);
_indic
i
es
.
add
(
index
+
1
);
_indic
i
es
.
add
(
index
+
4
);
_indices
.
add
(
index
);
_indices
.
add
(
index
+
1
);
_indices
.
add
(
index
+
4
);
_indic
i
es
.
add
(
index
+
1
);
_indic
i
es
.
add
(
index
+
5
);
_indic
i
es
.
add
(
index
+
4
);
_indices
.
add
(
index
+
1
);
_indices
.
add
(
index
+
5
);
_indices
.
add
(
index
+
4
);
}
}
}
...
...
@@ -184,7 +184,7 @@ class NineSliceSprite extends NodeWithSize with SpritePaint {
_textureCoordinates
,
_colors
,
TransferMode
.
modulate
,
_indic
i
es
,
_indices
,
_cachedPaint
);
}
...
...
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