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
b4abc233
Unverified
Commit
b4abc233
authored
Mar 09, 2022
by
Pierre-Louis
Committed by
GitHub
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update visibility of methods for internal use (#98124)
parent
39f31f0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
update_icons.dart
dev/tools/update_icons.dart
+9
-9
No files found.
dev/tools/update_icons.dart
View file @
b4abc233
...
...
@@ -42,7 +42,7 @@ const Map<String, List<String>> _platformAdaptiveIdentifiers = <String, List<Str
};
// Rewrite certain Flutter IDs (numbers) using prefix matching.
const
Map
<
String
,
String
>
identifierPrefixRewrites
=
<
String
,
String
>{
const
Map
<
String
,
String
>
_
identifierPrefixRewrites
=
<
String
,
String
>{
'1'
:
'one_'
,
'2'
:
'two_'
,
'3'
:
'three_'
,
...
...
@@ -77,7 +77,7 @@ const Map<String, String> identifierPrefixRewrites = <String, String>{
};
// Rewrite certain Flutter IDs (reserved keywords) using exact matching.
const
Map
<
String
,
String
>
identifierExactRewrites
=
<
String
,
String
>{
const
Map
<
String
,
String
>
_
identifierExactRewrites
=
<
String
,
String
>{
'class'
:
'class_'
,
'new'
:
'new_'
,
'switch'
:
'switch_'
,
...
...
@@ -191,10 +191,10 @@ void main(List<String> args) {
}
final
String
newCodepointsString
=
newCodepointsFile
.
readAsStringSync
();
final
Map
<
String
,
String
>
newTokenPairMap
=
_
stringToTokenPairMap
(
newCodepointsString
);
final
Map
<
String
,
String
>
newTokenPairMap
=
stringToTokenPairMap
(
newCodepointsString
);
final
String
oldCodepointsString
=
oldCodepointsFile
.
readAsStringSync
();
final
Map
<
String
,
String
>
oldTokenPairMap
=
_
stringToTokenPairMap
(
oldCodepointsString
);
final
Map
<
String
,
String
>
oldTokenPairMap
=
stringToTokenPairMap
(
oldCodepointsString
);
stderr
.
writeln
(
'Performing safety checks'
);
final
bool
isSuperset
=
testIsSuperset
(
newTokenPairMap
,
oldTokenPairMap
);
...
...
@@ -251,7 +251,7 @@ ArgResults _handleArguments(List<String> args) {
return
argParser
.
parse
(
args
);
}
Map
<
String
,
String
>
_
stringToTokenPairMap
(
String
codepointData
)
{
Map
<
String
,
String
>
stringToTokenPairMap
(
String
codepointData
)
{
final
Iterable
<
String
>
cleanData
=
LineSplitter
.
split
(
codepointData
)
.
map
((
String
line
)
=>
line
.
trim
())
.
where
((
String
line
)
=>
line
.
isNotEmpty
);
...
...
@@ -500,21 +500,21 @@ class Icon {
static
String
generateFlutterId
(
String
id
)
{
String
flutterId
=
id
;
// Exact identifier rewrites.
for
(
final
MapEntry
<
String
,
String
>
rewritePair
in
identifierExactRewrites
.
entries
)
{
for
(
final
MapEntry
<
String
,
String
>
rewritePair
in
_
identifierExactRewrites
.
entries
)
{
final
String
shortId
=
Icon
.
_generateShortId
(
id
);
if
(
shortId
==
rewritePair
.
key
)
{
flutterId
=
id
.
replaceFirst
(
rewritePair
.
key
,
identifierExactRewrites
[
rewritePair
.
key
]!,
_
identifierExactRewrites
[
rewritePair
.
key
]!,
);
}
}
// Prefix identifier rewrites.
for
(
final
MapEntry
<
String
,
String
>
rewritePair
in
identifierPrefixRewrites
.
entries
)
{
for
(
final
MapEntry
<
String
,
String
>
rewritePair
in
_
identifierPrefixRewrites
.
entries
)
{
if
(
id
.
startsWith
(
rewritePair
.
key
))
{
flutterId
=
id
.
replaceFirst
(
rewritePair
.
key
,
identifierPrefixRewrites
[
rewritePair
.
key
]!,
_
identifierPrefixRewrites
[
rewritePair
.
key
]!,
);
}
}
...
...
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