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
95116386
Unverified
Commit
95116386
authored
May 09, 2022
by
Gustav Bylund
Committed by
GitHub
May 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace ListView with ListView.builder for LicensesPage (#102692)
parent
6504f289
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
25 deletions
+23
-25
about.dart
packages/flutter/lib/src/material/about.dart
+23
-25
No files found.
packages/flutter/lib/src/material/about.dart
View file @
95116386
...
...
@@ -607,31 +607,29 @@ class _PackagesViewState extends State<_PackagesView> {
final
_LicenseData
data
,
final
bool
drawSelection
,
)
{
return
ListView
(
children:
<
Widget
>[
widget
.
about
,
...
data
.
packages
.
asMap
()
.
entries
.
map
<
Widget
>((
MapEntry
<
int
,
String
>
entry
)
{
final
String
packageName
=
entry
.
value
;
final
int
index
=
entry
.
key
;
final
List
<
int
>
bindings
=
data
.
packageLicenseBindings
[
packageName
]!;
return
_PackageListTile
(
packageName:
packageName
,
index:
index
,
isSelected:
drawSelection
&&
entry
.
key
==
(
selectedId
??
0
),
numberLicenses:
bindings
.
length
,
onTap:
()
{
widget
.
selectedId
.
value
=
index
;
_MasterDetailFlow
.
of
(
context
)!.
openDetailPage
(
_DetailArguments
(
packageName
,
bindings
.
map
((
int
i
)
=>
data
.
licenses
[
i
]).
toList
(
growable:
false
),
));
},
);
}),
],
return
ListView
.
builder
(
itemCount:
data
.
packages
.
length
+
1
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
if
(
index
==
0
)
{
return
widget
.
about
;
}
final
int
packageIndex
=
index
-
1
;
final
String
packageName
=
data
.
packages
[
packageIndex
];
final
List
<
int
>
bindings
=
data
.
packageLicenseBindings
[
packageName
]!;
return
_PackageListTile
(
packageName:
packageName
,
index:
packageIndex
,
isSelected:
drawSelection
&&
packageIndex
==
(
selectedId
??
0
),
numberLicenses:
bindings
.
length
,
onTap:
()
{
widget
.
selectedId
.
value
=
packageIndex
;
_MasterDetailFlow
.
of
(
context
)!.
openDetailPage
(
_DetailArguments
(
packageName
,
bindings
.
map
((
int
i
)
=>
data
.
licenses
[
i
]).
toList
(
growable:
false
),
));
},
);
},
);
}
}
...
...
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