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
a109fe68
Unverified
Commit
a109fe68
authored
Dec 09, 2020
by
George Wright
Committed by
GitHub
Dec 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop using the List constructor (#71957)
parent
d1f78b48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
heavy_grid_view.dart
dev/benchmarks/macrobenchmarks/lib/src/heavy_grid_view.dart
+1
-1
vitool.dart
dev/tools/vitool/lib/vitool.dart
+3
-3
main.dart
examples/image_list/lib/main.dart
+2
-2
No files found.
dev/benchmarks/macrobenchmarks/lib/src/heavy_grid_view.dart
View file @
a109fe68
...
...
@@ -19,7 +19,7 @@ class HeavyWidget extends StatelessWidget {
HeavyWidget
(
this
.
index
)
:
super
(
key:
ValueKey
<
int
>(
index
));
final
int
index
;
final
List
<
int
>
_weight
=
List
<
int
>
(
1000000
);
final
List
<
int
>
_weight
=
List
<
int
>
.
filled
(
1000000
,
null
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
dev/tools/vitool/lib/vitool.dart
View file @
a109fe68
...
...
@@ -77,7 +77,7 @@ class PathAnimation {
final
List
<
PathCommandAnimation
>
commands
=
<
PathCommandAnimation
>[];
for
(
int
commandIdx
=
0
;
commandIdx
<
frames
[
0
].
paths
[
pathIdx
].
commands
.
length
;
commandIdx
+=
1
)
{
final
int
numPointsInCommand
=
frames
[
0
].
paths
[
pathIdx
].
commands
[
commandIdx
].
points
.
length
;
final
List
<
List
<
Point
<
double
>>>
points
=
List
<
List
<
Point
<
double
>>>
(
numPointsInCommand
);
final
List
<
List
<
Point
<
double
>>>
points
=
List
<
List
<
Point
<
double
>>>
.
filled
(
numPointsInCommand
,
null
);
for
(
int
j
=
0
;
j
<
numPointsInCommand
;
j
+=
1
)
points
[
j
]
=
<
Point
<
double
>>[];
final
String
commandType
=
frames
[
0
].
paths
[
pathIdx
].
commands
[
commandIdx
].
type
;
...
...
@@ -422,7 +422,7 @@ class SvgPathCommandBuilder {
}
List
<
double
>
_pointsToVector3Array
(
List
<
Point
<
double
>>
points
)
{
final
List
<
double
>
result
=
List
<
double
>
(
points
.
length
*
3
);
final
List
<
double
>
result
=
List
<
double
>
.
filled
(
points
.
length
*
3
,
null
);
for
(
int
i
=
0
;
i
<
points
.
length
;
i
+=
1
)
{
result
[
i
*
3
]
=
points
[
i
].
x
;
result
[
i
*
3
+
1
]
=
points
[
i
].
y
;
...
...
@@ -433,7 +433,7 @@ List<double> _pointsToVector3Array(List<Point<double>> points) {
List
<
Point
<
double
>>
_vector3ArrayToPoints
(
List
<
double
>
vector
)
{
final
int
numPoints
=
(
vector
.
length
/
3
).
floor
();
final
List
<
Point
<
double
>>
points
=
List
<
Point
<
double
>>
(
numPoints
);
final
List
<
Point
<
double
>>
points
=
List
<
Point
<
double
>>
.
filled
(
numPoints
,
null
);
for
(
int
i
=
0
;
i
<
numPoints
;
i
+=
1
)
{
points
[
i
]
=
Point
<
double
>(
vector
[
i
*
3
],
vector
[
i
*
3
+
1
]);
}
...
...
examples/image_list/lib/main.dart
View file @
a109fe68
...
...
@@ -178,14 +178,14 @@ class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
@override
Widget
build
(
BuildContext
context
)
{
final
List
<
AnimationController
>
controllers
=
List
<
AnimationController
>
(
IMAGES
);
final
List
<
AnimationController
>
controllers
=
List
<
AnimationController
>
.
filled
(
IMAGES
,
null
);
for
(
int
i
=
0
;
i
<
IMAGES
;
i
++)
{
controllers
[
i
]
=
AnimationController
(
duration:
const
Duration
(
milliseconds:
3600
),
vsync:
this
,
)..
repeat
();
}
final
List
<
Completer
<
bool
>>
completers
=
List
<
Completer
<
bool
>>
(
IMAGES
);
final
List
<
Completer
<
bool
>>
completers
=
List
<
Completer
<
bool
>>
.
filled
(
IMAGES
,
null
);
for
(
int
i
=
0
;
i
<
IMAGES
;
i
++)
{
completers
[
i
]
=
Completer
<
bool
>();
}
...
...
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