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
40a2689b
Unverified
Commit
40a2689b
authored
Jan 13, 2022
by
Michael Goderbauer
Committed by
GitHub
Jan 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable unnecessary_late (#96417)
parent
7aaa87b5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
analysis_options.yaml
analysis_options.yaml
+1
-1
logical_key_data.dart
dev/tools/gen_keycodes/lib/logical_key_data.dart
+3
-3
matrix_utils.dart
packages/flutter/lib/src/painting/matrix_utils.dart
+1
-1
rendering_tester.dart
packages/flutter/test/rendering/rendering_tester.dart
+1
-1
event_simulation.dart
packages/flutter_test/lib/src/event_simulation.dart
+1
-1
No files found.
analysis_options.yaml
View file @
40a2689b
...
...
@@ -215,7 +215,7 @@ linter:
# - unnecessary_final # conflicts with prefer_final_locals
-
unnecessary_getters_setters
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
# - unnecessary_late # not yet tested
-
unnecessary_late
-
unnecessary_new
-
unnecessary_null_aware_assignments
-
unnecessary_null_checks
...
...
dev/tools/gen_keycodes/lib/logical_key_data.dart
View file @
40a2689b
...
...
@@ -387,7 +387,7 @@ class LogicalKeyData {
}
// Map Web key to the pair of key names
static
late
final
Map
<
String
,
_ModifierPair
>
_chromeModifiers
=
()
{
static
final
Map
<
String
,
_ModifierPair
>
_chromeModifiers
=
()
{
final
String
rawJson
=
File
(
path
.
join
(
dataRoot
,
'chromium_modifiers.json'
,)).
readAsStringSync
();
return
(
json
.
decode
(
rawJson
)
as
Map
<
String
,
dynamic
>).
map
((
String
key
,
dynamic
value
)
{
final
List
<
dynamic
>
pair
=
value
as
List
<
dynamic
>;
...
...
@@ -396,7 +396,7 @@ class LogicalKeyData {
}();
/// Returns the static map of printable representations.
static
late
final
Map
<
String
,
String
>
printable
=
(()
{
static
final
Map
<
String
,
String
>
printable
=
(()
{
final
String
printableKeys
=
File
(
path
.
join
(
dataRoot
,
'printable.json'
,)).
readAsStringSync
();
return
(
json
.
decode
(
printableKeys
)
as
Map
<
String
,
dynamic
>)
.
cast
<
String
,
String
>();
...
...
@@ -407,7 +407,7 @@ class LogicalKeyData {
/// These include synonyms for keys which don't have printable
/// representations, and appear in more than one place on the keyboard (e.g.
/// SHIFT, ALT, etc.).
static
late
final
Map
<
String
,
List
<
String
>>
synonyms
=
(()
{
static
final
Map
<
String
,
List
<
String
>>
synonyms
=
(()
{
final
String
synonymKeys
=
File
(
path
.
join
(
dataRoot
,
'synonyms.json'
,)).
readAsStringSync
();
final
Map
<
String
,
dynamic
>
dynamicSynonym
=
json
.
decode
(
synonymKeys
)
as
Map
<
String
,
dynamic
>;
return
dynamicSynonym
.
map
((
String
name
,
dynamic
values
)
{
...
...
packages/flutter/lib/src/painting/matrix_utils.dart
View file @
40a2689b
...
...
@@ -171,7 +171,7 @@ class MatrixUtils {
return
Rect
.
fromLTRB
(
_minMax
[
0
],
_minMax
[
1
],
_minMax
[
2
],
_minMax
[
3
]);
}
static
late
final
Float64List
_minMax
=
Float64List
(
4
);
static
final
Float64List
_minMax
=
Float64List
(
4
);
static
void
_accumulate
(
Float64List
m
,
double
x
,
double
y
,
bool
first
,
bool
isAffine
)
{
final
double
w
=
isAffine
?
1.0
:
1.0
/
(
m
[
3
]
*
x
+
m
[
7
]
*
y
+
m
[
15
]);
final
double
tx
=
(
m
[
0
]
*
x
+
m
[
4
]
*
y
+
m
[
12
])
*
w
;
...
...
packages/flutter/test/rendering/rendering_tester.dart
View file @
40a2689b
...
...
@@ -153,7 +153,7 @@ class TestRenderingFlutterBinding extends BindingBase with SchedulerBinding, Ser
}
}
late
final
TestRenderingFlutterBinding
_renderer
=
TestRenderingFlutterBinding
();
final
TestRenderingFlutterBinding
_renderer
=
TestRenderingFlutterBinding
();
TestRenderingFlutterBinding
get
renderer
=>
_renderer
;
...
...
packages/flutter_test/lib/src/event_simulation.dart
View file @
40a2689b
...
...
@@ -696,7 +696,7 @@ class KeyEventSimulator {
});
}
static
late
final
Map
<
String
,
PhysicalKeyboardKey
>
_debugNameToPhysicalKey
=
(()
{
static
final
Map
<
String
,
PhysicalKeyboardKey
>
_debugNameToPhysicalKey
=
(()
{
final
Map
<
String
,
PhysicalKeyboardKey
>
result
=
<
String
,
PhysicalKeyboardKey
>{};
for
(
final
PhysicalKeyboardKey
key
in
PhysicalKeyboardKey
.
knownPhysicalKeys
)
{
final
String
?
debugName
=
key
.
debugName
;
...
...
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